tags:

views:

426

answers:

1

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 corresponding > tag ... is this so ... my IDE does not highlight any errors so how can I find this unterminated 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.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.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) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

EDIT: taking away the ; as suggested gives me the following error. I know that ScanResultItem is definitely a class, as I have had this application running for quite a while. 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 a type can be imported. au.edu.uwa.peb.autoextractor.model.ScanResultItem resolves to a package

+1  A: 

Take away the ; at the end of the import, perhaps? Remember, the page import syntax isn't java.

skaffman