Reputation: 1326
While migrating Sun Tomcat 5.5 to Tomcat 7 found the next error when trying to access login page
Jan 21, 2015 8:37:41 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 62 in the jsp file: /nextagBase.jsp The final local variable request cannot be assigned. It must be blank and not using a compound assignment
request = HTTPRequest.getRequest(request);
I got solution for this problem this was mainly bcz use of single qoutes inside single quotes in JSP and tomcat 7 doesn't allow this.
Upvotes: 0
Views: 690
Reputation: 55
check the argument passed to getRequest(). call method without passing arguments.
request = HTTPRequest.getRequest();
Upvotes: 0
Reputation: 240860
request
is an implicit final Object reference in jsp, and you are trying to re-assign it which is not valid,
Rename the variable or better don't write Java on view template like JSP - use JSTL instead
Upvotes: 1