tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Tang" <altit...@airflash.com>
Subject Using a jsp:include action (JSP 1.1) within a BodyTag taglib tag
Date Tue, 30 Jan 2001 18:16:27 GMT
hi folks.  (Sorry for the wide distribution, this question seems to span
both the JSP and taglib realm).

I'm having a problem with the interaction of a taglib BodyTag and a
jsp:include action (or an equivalent taglib tag that uses a
pageContext.forward()).  For example, if I have:

     <foo:myBodyTag>
       Blah Blah...
       <jsp:include page="..."/>
     </foo:myBodyTag>

The output from the jsp:include action always appears BEFORE the output
from the myBodyTag taglib tag.

(BTW, I'm using Tomcat 3.1)

In reading the JSP 1.1 spec, section 5.4.5 says


     The BodyContent Class

     The BodyContent is a subclass of JspWriter that can be used to
     process body evaluations so they can retrieved later on. The
     class has methods to convert its contents into a String, to
     read its contents, and to clear the contents.

     The buffer size of a BodyContent object is “unbounded”. A
     BodyContent object cannot be in autoFlush mode. It is not
     possible to invoke flush on a BodyContent object, as there is
     no backing stream. This means that it is not legal to do a
     jsp:include when out is not bound to the top-level JspWriter.

     ...

Mime
View raw message