Focus的gravatar头像
Focus 2014-12-23 22:06:05

org.apache.jasper.JasperException: 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.JasperException: Unable to compile class for JSP: 

An error occurred at line: [94] in the generated java file: [D:\apache-tomcat-8.0.14\work\Catalina\localhost\manage_message\org\apache\jsp\login_005fsuccess_jsp.java]
Syntax error, insert "else Statement" to complete IfStatement

An error occurred at line: [94] in the generated java file: [D:\apache-tomcat-8.0.14\work\Catalina\localhost\manage_message\org\apache\jsp\login_005fsuccess_jsp.java]
Syntax error, insert "}" to complete Block

An error occurred at line: [111] in the generated java file: [D:\apache-tomcat-8.0.14\work\Catalina\localhost\manage_message\org\apache\jsp\login_005fsuccess_jsp.java]
Syntax error on token "}", delete this token

An error occurred at line: [112] in the generated java file: [D:\apache-tomcat-8.0.14\work\Catalina\localhost\manage_message\org\apache\jsp\login_005fsuccess_jsp.java]
Syntax error, insert "}" to complete ClassBody

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)
	com.message.servlet.LoginServlet.doPost(LoginServlet.java:55)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

最代码官方编辑于2014-12-23 22:08:16
所有回答列表(3)
最代码官方的gravatar头像
最代码官方  LV168 2014年12月23日

看起来是你的jsp语法有误:

Syntax error, insert "}" to complete Block

sarming的gravatar头像
sarming  LV2 2014年12月24日

是你代码中控制语句有问题呀,你代码编译就应该报错的。。。

身醉sz的gravatar头像
身醉sz  LV4 2014年12月25日

jasper 编译出问题,肯定是你的.jrxml文件有误。

.jrxml文件最好不要copy,先弄个简单的看能编译成功不

顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友