tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Tomcat4, taglibs, and pageContext.include
Date Sat, 27 Oct 2001 21:53:19 GMT


On Sat, 27 Oct 2001, Micael Padraig Og mac Grene wrote:

> Date: Sat, 27 Oct 2001 14:24:09 -0700
> From: Micael Padraig Og mac Grene <caraunltd@harbornet.com>
> Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>
> Subject: Re: Tomcat4, taglibs, and pageContext.include
>
> Would you please expand on the ramifications?
>
> Surely this does not mean that we won't be able to use <jsp: include [etc]>
> tags?  Does this mean that we won't be able to use code like:
>
>                  try {
>                      pageContext.include(content.toString());
>                  } catch(Exception e) {
>                     throw new JspException(e.getMessage());
>                  }
>
> In our tag classes?
>

You can do this if all you want is to route the included output to your
response.  However, if you want to capture the included data in the buffer
of a BodyTag (i.e. the equivalent of <jsp:include page="/foo"
flush="false"/>), you will have to resort to wrapping the response.

Craig


>
> -----Original Message-----
> From: Craig R. McClanahan <craigmcc@apache.org>
> To: Tomcat Developers Mailing List <tomcat-dev@jakarta.apache.org>
> Date: Saturday, October 27, 2001 1:56 PM
> Subject: Re: Tomcat4, taglibs, and pageContext.include
>
>
> >
> >
> >On Sat, 27 Oct 2001, Rickard Öberg wrote:
> >
> >> Date: Sat, 27 Oct 2001 16:16:15 +0200
> >> From: Rickard Öberg <rickard@xpedio.com>
> >> Reply-To: Tomcat Developers Mailing List <tomcat-dev@jakarta.apache.org>
> >> To: Tomcat Developers Mailing List <tomcat-dev@jakarta.apache.org>
> >> Subject: Re: Tomcat4, taglibs, and pageContext.include
> >>
> >> Rickard Öberg wrote:
> >>
> >> > Due to some recent subtle changes in Tomcat (Jasper and servlet API to
> >> > be precise) it is no longer possible to implement jsp:include tags.
> >>
> >>
> >> (clarification).. using pageContext.include.
> >>
> >> /Rickard
> >>
> >
> >The reason for this change is a statement in the Javadocs for
> >PageContext.include() that Tomcat 4 was not previously enforcing:
> >
> >    The current JspWriter "out" for this JSP is flushed as a
> >    side effect of this call, prior to processing the include.
> >
> >Ideally, that statement would have been removed from the Javadocs for JSP
> >1.2, but it wasn't ... and now we are stuck enforcing it.  If you look at
> >the code that Jasper generates for <jsp:include>, you will see that it
> >indeed no longer uses the PageContext.include() method in its
> >implementation.
> >
> >Craig
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> <mailto:tomcat-dev-help@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
>
>


--
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