File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes How to convert JSP into a txt or html file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to convert JSP into a txt or html file?" Watch "How to convert JSP into a txt or html file?" New topic
Author

How to convert JSP into a txt or html file?

Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Is it possible to insert the output of a JSP into an HTML file (or a text file)?
What I am trying to do is to take a compiled JSP, and convert that completed page into an HTMl file (or ascii text file) whose contents look like the source file from within Internet Explorer.
brisk rook
Greenhorn

Joined: Jul 19, 2001
Posts: 20


[This message has been edited by brisk rook (edited November 01, 2001).]
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

You could create a simple Java client (like a getURL() client) that makes an HTTP request to your application server for your JSP page -- it would send a legal HTTP request for the page and then listen for the response -- you could then strip out the headers and write the rest of the information to a file -- thus saving the <HTML> code.
Here's an example of GetURL that I found by doing a quick search google.
(fixed the link)
------------------
- Jessica Bradley
HP Bluestone
[This message has been edited by Jessica Bradley (edited November 02, 2001).]
[This message has been edited by Jessica Bradley (edited November 02, 2001).]


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
rudayashanker
Greenhorn

Joined: Oct 25, 2001
Posts: 11
I like to know much more about it,but URl is not working can u please help me in this topic.....
Thanks
Shankar
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

GetUrl
Dave.
 
Don't get me started about those stupid light bulbs.
 
subject: How to convert JSP into a txt or html file?