0

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.

aibotnet
  • 1,326
  • 1
  • 13
  • 27

2 Answers2

1

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

Community
  • 1
  • 1
jmj
  • 237,923
  • 42
  • 401
  • 438
0

check the argument passed to getRequest(). call method without passing arguments.

request = HTTPRequest.getRequest();