This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes access generated html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "access generated html" Watch "access generated html" New topic
Author

access generated html

A Pinheiro
Greenhorn

Joined: May 18, 2009
Posts: 4
hello to you all and I'm really sorry if this doesn't belong here...

So I'm using JSP to generate my html and what I would like is to access the response complete with the whole html generated by the JSP and generate a pdf from it.

I know how I could generate the pdf from the html, I need help just figuring out how I can access the generated html. And I'm guessing I will have problems when I'll want to clean the response outputstream and serve a pdf instead...

Any ideas?

Thanks a lot,
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
This is a job for (dum da da dum da da DAAAAA!) a Servlet filter!

The servlet filter can create a wrapped response object to pass down to lower layers, that can read the response output stream coming from your JSP, and get the HTML.
It can then process that and write to the REAL output stream going back to the client.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access generated html