org.apache.jasper.JasperException: Unable to compile class for JSP:
Hi
I have spent the past few days scouring forums and the net looking for a solution to this. I have read a lot of fixes but as yet haven't had any luck correcting the error.
The error is:
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
HTTP Status 500 -
type Exception report
message
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: 263 in the generated java file
Syntax error, insert "else Statement" to complete IfStatement
An error occurred at line: 263 in the generated java file
Syntax error, insert "}" to complete Block
An error occurred at line: 273 in the generated java file
Syntax error on token "}", delete this token
An error occurred at line: 274 in the generated java file
Syntax error, insert "}" to complete ClassBody
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.jav acError(Unknown Source)
org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(Unknown Source)
org.apache.jasper.compiler.JDTCompiler.generateCla ss(Unknown Source)
org.apache.jasper.compiler.Compiler.compile(Unknow n Source)
org.apache.jasper.compiler.Compiler.compile(Unknow n Source)
org.apache.jasper.compiler.Compiler.compile(Unknow n Source)
org.apache.jasper.JspCompilationContext.compile(Un known Source)
org.apache.jasper.servlet.JspServletWrapper.servic e(Unknown Source)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(Unknown Source)
org.apache.jasper.servlet.JspServlet.service(Unkno wn Source)
javax.servlet.http.HttpServlet.service(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0-snapshot logs.
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
The url on the error page is:
10.0.0.241:8080/cca/docs/display_docs.jsp?cca_key=8356&field=cmpy_name&valu e=ROSE&type=Search&cmpyname=ROSE%20INNES%20AUCTION S%20CC&branch=East%20London®no=200407393023&dt= Thu%20Jul%2017%202008%2015:44:38%20GMT+0200%20(SAS T)
so I assume that the jsp in question is display_docs.jsp - but this script only has 126 lines.
I have found the class that is created but the class is created new at runtime of the application so editing that is pointless.
Is the error being caused due to the "Unknown Source"?
If this is causing the problem, where can I get the known source?
The code was developed in NetBeans 5.5 and is being run on an external server running Tomcat 6.
My servlet.jar is set as /usr/share/tomcat-servlet-api-2.5/lib/servlet-api.jar
I'm still searching and I'm that interested in finding the solution that I'm even willing to risk the sometimes rude and harsh comments from more experienced Java coders.
Any input will be welcomed.
Re: org.apache.jasper.JasperException: Unable to compile class for JSP:
Check your open ({) and close ({). Somewhere you missed close } in your JSP. so that only you got this error.
Re: org.apache.jasper.JasperException: Unable to compile class for JSP:
Look at the date? Your answer is Years too late.