I am in roughly the same boat as you John as I need to manipulate the
response.
I cannot find a pushBody method for HttpServletResponse:(
James
----- Original Message -----
From: "John Villar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 12:32 PM
Subject: Re: Reading Servlet OutputStream
> Look at the pushBody method of the response class
> (HttpServletResponse).... that's all you need
>
> Nitin Mulimani escribi�:
>
> >This question is is more on the Servlet API.
> >
> >
> >
> >I want to read the servlet output stream and save in some buffer or
> >file, and then forward it to the client. I use filters to play with the
> >Request and Response objects.
> >
> >
> >
> >These are some of the things I have tried.
> >
> >1) I have a Wrapper which extends HttpServletResponseWrapper
> >
> >2) Constructed a PrintWriter writer = new PrintWriter(new
> >OutputStreamWriter(origResponse.getOutputStream(), charEnc));
> >
> >Reader reader = new StringReader(printWriter.toString());
> >
> > BufferedReader bufferedReader = new BufferedReader(reader);
> >
> > String line;
> >
> > while ((line = bufferedReader.readLine()) != null) {
> >
> > System.out.println("line : " + line);
> >
> > }
> >
> >3) bufferedReader.close();
> >
> >
> >
> >Still am not able to read the response. I can write to the response, but
> >am stuck at reading the response.
> >
> >
> >
> >Any pointers.
> >
> >
> >
> >-- Nitin
> >
> >
> >
> >
>
> --
> John Villar
> Gerente de Proyectos
> Computadores Flor Hard Soft 2058 C.A.
> www.florhard.com
>
>
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]