您当前的位置: 首页 >  http

qq_34412985

暂无认证

  • 0浏览

    0关注

    1061博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Tomcat服务端工程部署遇到的 “The method getDispatcherType() is undefined for the type HttpServletReques

qq_34412985 发布时间:2017-09-22 17:33:22 ,浏览量:0

1.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包,问题解决。

换了个从tomcat8换成7可以了

转载别处:http://www.cnblogs.com/NILIN/p/4865455.html
关注
打赏
1653291990
查看更多评论
立即登录/注册

微信扫码登录

0.0493s