You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/10/31 16:57:59 UTC

DO NOT REPLY [Bug 4542] New: - jsp:include inside a custom tag can throw an exception.

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=4542>.
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=4542

jsp:include inside a custom tag can throw an exception.

           Summary: jsp:include inside a custom tag can throw an exception.
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Jasper
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: pduffin@volantis.com


If you jsp:include a page which throws an exception and the handles it the
rest of the including page is still processed, although it does not generate
any extra output. If the included page does not handle the exception then
the including page handles it which stops the rest of the page from being
processed.

If the jsp:include is done from inside a custom tag then on return from 
processing the included page the BodyContent of the tag has been closed 
(by ApplicationDispatcher.doForward) which means that any attempt to use
it will fail, probably with a NullPointerException.
e.g.  out.write (...) after returning from include throws this

java.lang.NullPointerException
    at java.lang.System.arraycopy(Native Method)
    at java.lang.String.getChars(String.java:553)
    at org.apache.jasper.runtime.BodyContentImpl.write(Unknown Source)
    at org.apache.jasper.runtime.BodyContentImpl.write(Unknown Source)
    at org.apache.jsp.IncludeTest3$jsp._jspService(IncludeTest3$jsp.java:204)

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>