tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: Subclassing ServletOutputStream/PrintWriter
Date Tue, 03 Aug 2004 13:15:27 GMT

Why are you doing this at all?  Even if your approach worked you'd be at
a strange place as far as the Servlet Spec is concerned.  Once a
response is committed, it should be done.  No more writing.

Yoav Shapira
Millennium Research Informatics

>-----Original Message-----
>From: Kaleb Pederson []
>Sent: Monday, August 02, 2004 6:25 PM
>To: Tomcat Users List
>Subject: Subclassing ServletOutputStream/PrintWriter
>I'm receiving a committed response object in an Servlet that I wrote.
>response is committed, as far as I can tell, I need to create a custom
>HttpServletResponseWrapper. But as the response object is committed, it
>to use a new print writer or output stream.  So, as far as I can tell I
>to do the following steps:
>1) Subclass HttpServletResponse wrapper which overrides getWriter() and
>2) Subclass PrintWriter (so getWriter will return a non-committed
>3) Subclass ServletOutputStream (so getOutputStream will return a
>non-committed object.)
>Although I know write(int) needs to be implemented by
>don't see how that would be nearly sufficient?  How does Tomcat get at
>buffer associated with an output stream so that it can send it to the
>What should my required steps be?
>Thanks for the help.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message