wood burning stoves 2.0
The moose likes JSP and the fly likes Can i obtain the generated HTML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Can i obtain the generated HTML?" Watch "Can i obtain the generated HTML?" New topic

Can i obtain the generated HTML?

Marcio Di Pietro

Joined: May 30, 2003
Posts: 2
Hello fellows,

Can i obtain the generated HTML? The result of JSP? i'm using struts and working with actions ".do".
May i have to extend something in struts to get the generated html? i want this file code to make a specific parse in the html. I already have the parser working perfect, but i still haven't found a way to get the generated code by struts.

Hey, who are you ?<br />Give me some code.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
The HTML is sent directly to the calling process (usually a web browser somewhere on the network) by the application server.

You might be able to install something that captures that data and does something with it, which is exactly the way proxyservers work (as well as criminals who sit in between webservers and browsers and use this method to steal user information).

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33134

Do you want to get the generated HTML on your computer or on the server? If on your computer, it's as simple as doing a "save as" on the page. If on the server, you may want to look into a testing framework (like httpunit) that lets you run actions and get their generated results.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Vladas Razas
Ranch Hand

Joined: Dec 02, 2003
Posts: 385
Open you web page with Internet Explorer, from menu select View/Source.
I agree. Here's the link: http://aspose.com/file-tools
subject: Can i obtain the generated HTML?
It's not a secret anymore!