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 5868] - <jsp:include> and RequestDispatcher output is wrong.
Date Fri, 18 Jan 2002 14:13:38 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=5868>.
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=5868

<jsp:include> and RequestDispatcher output is wrong.

Larry.Isaacs@sas.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From Larry.Isaacs@sas.com  2002-01-18 06:13 -------
Here is what is happening with buffering in your case:

1. "FIRST:<br>" goes into local JSP buffer.
2. Local JSP buffer is flushed by <jsp:include ... flush="true"/>
3. first.jsp output is included and flushed before returning to main.jsp
4. "<br>" goes into local JSP buffer.
5. Local JSP buffer is flushed by explicit out.flush().
6. "SECOND:<br>" goes into local JSP buffer.
7. RequestDispatcher includes second.jsp and is flushed before returning to
   main.jsp. This slips second.jsp's output ahead of "SECOND:<br>" which
   is still sitting in the local JSP buffer.
8. Local JSP buffer is flushed at end of main.jsp. This is when "SECOND:<br>"
   is sent.

The added out.flush() has to appear just before the RequestDispatcher if it
is to flush all locally buffered JSP text.

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