tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 30073] New: - NPE when compiling .jspx with broken xml format in jspcmode
Date Tue, 13 Jul 2004 13:20:48 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30073>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30073

NPE when compiling .jspx with broken xml format in jspcmode

           Summary: NPE when compiling .jspx with broken xml format in
                    jspcmode
           Product: Tomcat 5
           Version: 5.0.25
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: martin.grebac@sun.com


While compiling jsp in broken xml format:

<?xml version="1.0" encoding="UTF-8"?>
<jspX:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">

    <!-- to change the content type or response encoding change the following
line -->
    <jsp:directive.page contentType="text/xml;charset=UTF-8"/>

    <!-- any content can be specified here, e.g.: -->
    <jsp:element name="text">
        <jsp:attribute name="lang">EN</jsp:attribute>
        <jsp:body>Sample text</jsp:body>
    </jsp:element>
</jsp:root>

with jasper in jspc mode, we get following exception:

java.lang.NullPointerException
org.apache.jasper.compiler.Mark.getURL(Mark.java:213)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:355)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:90)
org.apache.jasper.compiler.JspDocumentParser.parse(JspDocumentParser.java:201)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:197)
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:461)
org.apache.jasper.JspC.processFile(JspC.java:761)
org.apache.jasper.JspC.execute(JspC.java:885)
org.netbeans.modules.web.project.ant.JspC.main(JspC.java:39)
org.apache.jasper.JasperException

When JspServlet invokes compilation everything works ok, but ErrorDispatcher in
jspcmode probably gets null in mark.getUrl() call and .toString() method then
throws uncaught NPE.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message