tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luke (Terry) Vanderfluit" <>
Subject Re: Capturing HTML using Tomcat 4
Date Thu, 07 Oct 2004 00:54:16 GMT

I'm not sure if this is what you mean.
You could simply run the following code to capture the output of the

String htmlText;
         URL u = new
         BufferedReader htmlPage =
               new BufferedReader(new InputStreamReader(
         while((htmlText = htmlPage.readLine()) != null){

On Thu, 2004-10-07 at 07:39, David Wall wrote:
> I've been looking through archives and such for examples of how to capture
> the HTML output from a given JSP programmatically so I can archive or do
> other things with that HTML.  For example, we might do this to record the
> text of an agreement that was displayed to a user, in which a JSP generated
> the agreement HTML page.  The pages may be generated from either HTTP GET or
> It would be nice to perhaps just have a servlet "include" the response from
> a JSP, passing along the GET/POST request to that JSP, but then have the
> servlet capture the JSP's response in a string for processing/storage.
> O'Reilly has a caching servlet that may help, but I was wondering if anybody
> had come out with an elegant way to do this.
> Thanks,
> David
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
Luke (Terry) Vanderfluit 
Mobile: 0421 276 282     

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

View raw message