Another way is to proxy it yourself. This may or may not work if you are dependent on user state. Basically, you server code plays the role of the web browser ala wget.
(not sure if the following code is correct. Let the buyer beware) URL url = new URL(pageToCache); String pageToCacheContent = (string)url.getContent(); If you are dependant on user state, You may need to do some additional hacking Scott Sayles wrote: >There are probably numerous ways this can be done. If you just want to >easily capture the output from a single page, you could simply make that >page an included page and use the <bean:include> tag to capture it's >output. i.e. make the requested page include the real page via the ><bean:include> tag. > >For example: > >----- page1.jsp ----- > ><bean:include id="page2Output" page="page2.jsp"/> > ><% >writeFile(page2Output); //or however else you're going to do this >%> > ><bean:write name="page2Output"/> > >--------------------- > >Where page2.jsp is what you actually want to display to the user. > > >This is not the best solution in all cases, but may suffice for your >needs. > >Scott > > >On Fri, 2001-11-02 at 01:20, Brandon Goodin wrote: > >>I need it to capture the returning html/page on the server side. For >>example, a client makes a request to a jsp page on my website and an an html >>page is returned. Is there a way to capture the html being returned to a >>file on the server side before it is sent to the client or as it is heading >>out. I would like to capture this output to a static file. >> >>Brandon Goodin >>Phase Communications >>P (406)862-2245 >>F (406)862-0354 >>http://www.phase.ws >> >> >>-----Original Message----- >>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] >>Sent: Thursday, November 01, 2001 11:00 PM >>To: Struts Users Mailing List; [EMAIL PROTECTED] >>Subject: Re: Capturing an outgoing response. >> >> >>You might want to take a look at WebDebug: >> >>http://www.cyberclip.com/webdebug/ >> >>-- >>Martin Cooper >> >> >>----- Original Message ----- >>From: "Brandon Goodin" <[EMAIL PROTECTED]> >>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> >>Sent: Thursday, November 01, 2001 6:34 PM >>Subject: Capturing an outgoing response. >> >> >>>Is it possible to capture the html page that is generated by a jsp page >>>before it is sent to the client who requested it? >>> >>>Brandon Goodin >>>Phase Communications >>>P (406)862-2245 >>>F (406)862-0354 >>>http://www.phase.ws >>> >>> >>> >>> >>>-- >>>To unsubscribe, e-mail: >>> >><mailto:[EMAIL PROTECTED]> >> >>>For additional commands, e-mail: >>> >><mailto:[EMAIL PROTECTED]> >> >> >> >>-- >>To unsubscribe, e-mail: >><mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: >><mailto:[EMAIL PROTECTED]> >> >> >> >> >>-- >>To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> >> > > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

