码迷,mamicode.com
首页 > Web开发 > 详细

Tomcat6服务端工程部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题

时间:2015-10-10 00:19:44      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:

一个安卓服务端程序起初部署在Tomcat6.0当中,但是当我用Tomcat8.0部署时,出现了一个错误:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: [52] in the generated java file: [D:\apache-tomcat-8.0.15\work\Catalina\localhost\allRunServer\org\apache\jsp\register_jsp.java]
The method getDispatcherType() is undefined for the type HttpServletRequest

Stacktrace:
	org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
	org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199)
	org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
思考了一下,不同版本的Tomcat其中的library肯定有所区别,项目自带的jar Package肯定是用于Tomcat6.0的,所以此时,我将Tomcat8的library目录中的servlet-api.jar 覆盖了项目中原有的相同jar包,问题解决。

Tomcat6服务端工程部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题

标签:

原文地址:http://www.cnblogs.com/NILIN/p/4865455.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!