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 15851] New: - Parser generates a NullPointerException for invalid use case of jsp:attribute instead of a useful message.
Date Tue, 07 Jan 2003 18:55:11 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15851>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15851

Parser generates a NullPointerException for invalid use case of jsp:attribute instead of a
useful message.

           Summary: Parser generates a NullPointerException for invalid use
                    case of jsp:attribute instead of a useful message.
           Product: Tomcat 5
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: Ryan.Lubke@Sun.COM


Consider the following fragment which is supposed to generate a translation-time
error:

<jsp:attribute>
    <jsp:attribute name="name">
        someattr
    </jsp:attribute>
    <jsp:body>
        someattrvalue
    </jsp:body>
</jsp:attribute>

According to the specification, if a jsp:attribute standard action is nested
within another jsp:attribute standard action, a translation error must occur.

In this case, a translation error does occur, but for the wrong reason.  Here is
the resulting cause:

<stacktrace>
java.lang.NullPointerException
        at org.apache.jasper.compiler.Parser.getAttributeBodyType(Parser.java:1736)
        at org.apache.jasper.compiler.Parser.parseNamedAttributes(Parser.java:1710)
        at
org.apache.jasper.compiler.Parser.parseJspAttributeAndBody(Parser.java:1045)
        at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1017)
        at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1313)
        at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1458)
        at org.apache.jasper.compiler.Parser.parse(Parser.java:164)
</stacktrace>

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


Mime
View raw message