tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Woithe <stefan.woi...@net-linx.com>
Subject Re: writing jsp output to a file
Date Tue, 14 Nov 2000 19:54:10 GMT
Joe Laffey wrote:
> 
> On Mon, 13 Nov 2000, John Ellis wrote:
> 
> > All you need to do is create a virtual browser:
> >
> > URL pageYouWant = new URL(completeRequestString);
> > InputStream in = pageYouWant.openStream();
> > // burn off the header from in, then write the rest to a file...
> >
> > This will all be done, of course, in a completely seperate JVM than your
> > Tomcat JVM.
> >
> > It sounds like an ineresting application of jsp.
> 
> What if you compile your ordinary JSP into a servlet (by executing it
> normallY). Then go to the compiled servlet and replace "out" with a normal
> DataOutputStream or FileWriter.
> 
> Remember that your JSPs all get converted to servlets, which encapsulate
> the HTML portions of the JSP page into out.print() statements.
> 
> If you had to do this a lot I bet you could hack a copy of Tomcat or
> GNUJSP pretty easily so that it did this be default.

Any idea which parts of Tomcat 3.1final to hack in order to build this? I've a similiar problem:
in a servlet I include a JSP (via request dispatcher). This jsp renders just a part of the
whole response page and I want to get just this part stored.

Thank you

Stefan


Mime
View raw message