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


    部署war时,遇到以下异常:
    exception org.apache.jasper.JasperException: Unable to compile class for JSP
    	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:604)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    	com.sk.skkx.common.SessionAreaQueryFilter.doFilter(SessionAreaQueryFilter.java:167)
    	com.sk.skkx.common.CookieLoginFilter.doFilter(CookieLoginFilter.java:179)
    	com.sk.admin.common.filter.LoginFilter.doFilter(LoginFilter.java:62)
    	org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
    	org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
    	org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
    	org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:390)
    	com.zl.common.SetCharEncodingFilter.doFilter(SetCharEncodingFilter.java:73)
     root cause java.io.IOException: tmpFile.renameTo(classFile) failed
    	org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:246)
    	org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:165)
    	org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:458)
    
    
    解决:
    找到war解压开的lib里面的servlet-api.jar的类似版本号,比方:servlet-api-2.5.jar。

    然后使用tomcat的lib中的servlet-api.jar替换。然后重新启动tomcat。

  • 相关阅读:
    thinkphp--标签库
    thinkphp中的参数绑定
    thinkphp3.2.3子查询中遇到的错误
    开篇马克
    BST树、B-树、B+树、B*树
    linux shell编程之变量和bash配置文件(第一篇)
    linux awk进阶篇
    linux awk(gawk)
    linux sed命令
    linux basic
  • 原文地址:https://www.cnblogs.com/clnchanpin/p/7294474.html
Copyright © 2020-2023  润新知