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。

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-10-18 01:14:23

org.apache.jasper.JasperException: Unable to compile class for JSP的相关文章

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

1.错误描述 Count:858org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 12 in the jsp file: /resource/pages/storageTankQuery/storageTankInfo/storageTankInfo.jsp basePath cannot be resolved to a variable 9: // 璺

解决Jsp运行org.apache.jasper.JasperException: Unable to compile class for JSP:问题

初学Maven就遇到困难了!!!在b站跟着视频开始接触maven来创建一个webapp项目,在jsp跳转的时候遇到一个bug,身边也没大佬带,只能自己慢慢摸索,在Maven项目中出现了报org.apache.jasper.JasperException: Unable to compile class for JSP:的问题,在网上查了很多方法来尝试解决,但天资愚钝无法理解大佬的跳转思维,后面某论坛看到解决放方案. 链接:https://blog.csdn.net/u011781521/arti

JAVA Drp项目实战—— Unable to compile class for JSP 一波三折

交代下背景,电脑系统是64位的,用的是64位的Tomcat,安装是32位的Myeclipse10,java环境也是32位的,Tomcat在开始启动时会报这样一个错误,"Can't load IA 64-bit .dll on a AMD32-bit platform",但是不耽误使用,最近在敲Drp项目中用到了底层接口的几个方法,这个错误导致项目不能正常运行了,所以就将64位的Tomcat换成了与java环境一样的32位的Tomcat,上面的问题就顺利解决了,于是继续自己的开发,但是当

Unable to compile class for JSP 错误的解决过程。

刚配置好Tomcat.启动项目没问题.然后一访问就报错了. ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2012-8-18 19:17:40 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet jsp threw exception org.apac

jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP

HTTP Status 500 - Unable to compile class for JSP: type Exception report message Unable to compile class for JSP: description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperE

Maven项目不能编译jsp解决方法:Unable to compile class for JSP

一.问题描述: 先交代开发环境,JDK是1.8的,IDE是eclipse 4.7,web服务器是Tomcat 9.0,maven是3.5.0,搭建好环境后输入命令tomcat:run,然后就报org.apache.jasper.JasperException: Unable to compile class for JSP错误. 二.分析问题: (1)不能编译应该是没有导入servlet-api.jsp-api包的原因,然后就在pom文件中加上servlet-api.jsp-api包,为了防止包

Message Unable to compile class for JSP

使用 UniEAPWorkshop_5.0运行4.6 的代码,流程新建时出现的错误 JDK 使用C:\Program Files (x86)\Java\jdk1.7.0_80 tomcat使用 apache-tomcat-7.0.91   改成apache-tomcat-6.0.41 解决! HTTP Status 500 – Internal Server Error ---------------------------------------------------------------

报错:org.apache.jasper.JasperException: /index.jsp (line: 1, column: 17) equal symbol expected

现象:写了如下一个jsp文件,导入需要用到的两个包: 运行结果报错:org.apache.jasper.JasperException: /index.jsp (line: 1, column: 17) equal symbol expected at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) at org.apache.jasper.compiler.ErrorDis

org.apache.jasper.JasperException

1.错误描述 2014-7-13 17:20:50 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [jsp] in context with path [/FirstSSH] threw exception [/pages/student.jsp (line: 3, column: 0) /pages/pathTags.jsp (line: 1, column: 59)