We had a similar task that Andy described and solved it in almost exactly a
way Geoff suggested.
But if I were to approach it now, I'd rather use filter and owerwrite response
object.
That saves extra HTTP connection within request processing and looks more
elegant anyway.
~boris
Geoff Marshall wrote:
> No problem, write a servelt or other JSP page that does a method='post' to
> the JSP in question. You will have to read the output of the page into a
> variable. Then you can write the variable to both a file and out.println.
>
> The only catch is you will have to have a class that can do a post! See the
> attatchment...
> --
>
> -Geoff Marshall, Director of Development
>
> .......................................................
> t e r r a s c o p e (415) 951-4944
> 54 Mint Street, Suite 110 direct (415) 625-0349
> San Francisco, CA 94103 fax (415) 625-0306
> .......................................................
>
> > From: [EMAIL PROTECTED]
> > Reply-To: Orion-Interest <[EMAIL PROTECTED]>
> > Date: Thu, 1 Mar 2001 11:32:25 -0500
> > To: Orion-Interest <[EMAIL PROTECTED]>
> > Subject: Capturing the output of a JSP page as HTML
> >
> > Can anyone tell me if this is possible. I have a JSP page that contains
> > information about an order that was just entered (Essentially a
> > confirmation page). What I want to do is somehow intercept the output
> > stream inside the JSP page and write it to a file, as plain html, which I
> > will later attach to an email and send to someone.
> >
> > Thanks,
> > Andy
> >
> >
> >
>
> ------------------------------------------------------------------------
> Name: RequestBean.java
> RequestBean.java Type: Plain Text (text/plain)
> Encoding: base64