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 2004/03/05 00:09:37 UTC

DO NOT REPLY [Bug 16407] - RequestDispatcher.include() seems to be discarding the response's writer

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

RequestDispatcher.include() seems to be discarding the response's writer

markt@apache.org changed:

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



------- Additional Comments From markt@apache.org  2004-03-04 23:09 -------
Thanks for the test app. I have stepped through the code and the root cause is 
the way you are constructing the PrintWriter. When creating a PrintWriter 
directly from an OutputStream an intermediate OutputStreamWriter is created. 
When, at the end of processing the included page (in PageContextImpl)
out.flushBuffer() is called the content of the included page is written to the 
PrintWriter which in turn writes to the OutputStreamWriter but because, unlike 
flush(), flushBuffer() does not propogate through the Writers the data never 
makes it to your OutputStream. Adding a out.flush() to the end of your 
included page fixes this.

AFAIK Tomcat is behaving correctly in this case.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org