zoukankan      html  css  js  c++  java
  • Tomcat6服务端工程部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题

    一个安卓服务端程序起初部署在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.15workCatalinalocalhostallRunServerorgapachejsp
    egister_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包,问题解决。
  • 相关阅读:
    mysql 主从复制
    confluence wiki搭建使用
    python 解析json loads dumps
    在linux下修改mysql的root密码
    [转]量子恒道统计
    php include
    php solr 查询
    php solr 扩展
    IKAnalyzer 和 solr4.3 冲突
    solr 4.3.0 配置
  • 原文地址:https://www.cnblogs.com/NILIN/p/4865455.html
Copyright © 2011-2022 走看看