On 15/05/2021 22:34, Jim Anderson wrote:
I'm using Tomcat 8.5.63 and in the last few days I started getting an error
message in a few of my JSP files. The error message is:
________________________START ERROR____________________________
Type Exception Report
Message Unable to compile class for JSP:
Description The server encountered an unexpected condition that prevented
it from fulfilling the request.
Exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [1] in the jsp file: [/pages/list.jsp]
Syntax error on token ";", enum expected after this token
1: <%@ page language="java" contentType="text/html" %>
2: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core
<http://java.sun.com/jsp/jstl/core>" %>
3: <%@ page import = "java.io.*,java.util.*" %>
4: <%@ page import="bfs.hypBeans.HypEvent" %>
_____________________________END ERROR___________________________________
As you can see, there is no semicolon in line 1 and the error message
is showing the code exactly as it is in the tomcat/webapps/... directory.
Can anyone help explain why a semi-colon error would be reported in the
error message when
it does not exist in the source code?
The ';' will be in the generated Java source code. Tomcat uses "Java
Debugging Support for Other Languages" to map errors in the Java source
to the associated line in the JSP.
Compilation errors often don't map very well.
You want to look at the generated source for the JSP (it will be in the
work directory) and see if you can figure out what is triggering the error.
Alternatively, post the source for the simplest standalone JSP that
triggers the issue and the people here can try and reproduce it.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org