tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: JSP with taglibs -- output in wrong order without flush?
Date Thu, 03 Aug 2000 02:12:41 GMT
Kumanan Rajamanikkam wrote:

>
>
> Serge,
>
> In my project Most of our JSP's have both <jsp:include> and
> <jsp:forward> like for example
>
> <jsp:include page="/xyz.jsp" flush="true"/>
> <% if ( i > 100 ) { %>
> <jsp:forward page="/displayaccounts.jsp"/>
> <% } %>
>
> This code works in JRun2.3.3. But gives the following error in Tomcat.
>
>         javax.servlet.ServletException: Error: Attempt to clear a
> buffer that's already been flushed
>

This code should not work on any servlet container implementing servlet
2.2 and JSP 1.1, because you cannot do a forward after the response has
been committed, and your <jsp:include> command committed thre response
(because of the flush="true").

For JSP 1.1, flush="true" is the only legal setting on <jsp:include>.
This is being looked at in the context of the Servlet 2.3 and JSP 1.2
specs.

Craig McClanahan



Mime
View raw message