Hi
It looks like Tomcat cannot generate Servlet code for JSP files that have incorrect HTMLish syntax. In the simple JSP page below I have written the end </html> tag incorrectly and have missed to put the end > character and then Tomcat complains that it cannot compile the class for my JSP.
Is this behaviour expected or is it a bug?
Regards, Behrang S.
JSP page: ---------
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html> <head><title>Simple jsp page</title></head> <body bgcolor="black"> </body> </html
Exception: ----------
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:515) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
root cause
java.lang.ArrayIndexOutOfBoundsException: 162 org.apache.jasper.compiler.JspReader.peekChar(JspReader.java:154) org.apache.jasper.compiler.JspReader.isSpace(JspReader.java:347) org.apache.jasper.compiler.JspReader.isDelimiter(JspReader.java:414) org.apache.jasper.compiler.JspReader.parseToken(JspReader.java:395) org.apache.jasper.compiler.Parser.checkUnbalancedEndTag(Parser.java:1699) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1561) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:220) org.apache.jasper.compiler.ParserController.parse(ParserController.java:101) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.compiler.Compiler.compile(Compiler.java:422) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.24 logs.
Apache Tomcat/5.0.24
BTW, I'm using Tomcat version 5.0.24.
-- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]