Org.apache.jasper.JasperException .... Unterminated & lt;% @page tag
I get
org.apache.jasper.JasperException: /index.jsp (2,1) Unterminated <% @page tag
The page tags look like this:
<%@ page import="java.util.*" %>
<%@ page import="au.edu.uwa.peb.autoextractor.model.ScanResultItem"; %>
This seems to indicate to me that a <does not have a matching tag ... it does ... my IDE is not highlighting any errors, so how can I find this unfinished tag. Is there a JSP validation tool that I can use, perhaps online?
The stack trace looks like this:
org.apache.jasper.compiler.DefaultErrorHandler.jspError (DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch (ErrorDispatcher.java:407) org.apache.jaspercher.compiler.jspErrorDischer java: 132) org.apache.jasper.compiler.Parser.parseDirective (Parser.java:520) org.apache.jasper.compiler.Parser.parseTagFileDirectives (Parser.java:1784) org.apache.jasper.compiler.Parser. parse (Parser.java:127) org.apache.jasper.compiler.ParserController.doParse (ParserController.java:255)
org.apache.jasper.compiler.ParserController.parseDirectives (ParserController.java:120) org.apache.jasper.compiler.Compiler.generateJava (Compiler.java:165) org.apache.jasper.compiler.Compiler.compile (Compiler. java: 332) org.apache.jasper.compiler.Compiler.compile (Compiler.java:312) org.apache.jasper.compiler.Compiler.compile (Compiler.java:299) org.apache.jasper.JspCompilationContext.compile ( JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:342). JspServlet.service (JspServlet.java:267) javax.servlet.http.HttpServlet.service (HttpServlet.java:717)
EDIT: pick up; as suggested gives me the following error. I know ScanResultItem is definitely a class since I have had this application running for quite some time. I made a few changes and now it won't compile.
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 6 in the generated java file Only type can be imported. au.edu.uwa.peb.autoextractor.model.ScanResultItem resolves package
a source to share
I had the same problem.
And the answer to the mentioned question is there is something wrong between the tags.
In this case, the problem was: ';' the character. After he fixed it, another error appeared.
In my case, the code was (I am using the alloy interface, but it is in many cases):
<aui:option
value="<%=attr.getType()%>"
selected="<% System.out.println("bazinga") %>"
>
And the error was that I cannot declare: "<% ...%>", but I can: <% = ...%> between these tags.
I would suggest whoever has this problem. Try to comment out the part of the code with <% - -%> tags. This is an old post, but I hope this is helpful!
a source to share