• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert JSP into a txt or html file?

 
Joe McGuire
Ranch Hand
Posts: 293
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


[This message has been edited by brisk rook (edited November 01, 2001).]
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
rudayashanker
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GetUrl
Dave.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic