wood burning stoves 2.0*
The moose likes JSP and the fly likes Jsp to html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Jsp to html" Watch "Jsp to html" New topic
Author

Jsp to html

Mandy S Smith
Greenhorn

Joined: Jan 20, 2002
Posts: 24
Is there a way, a method or a class in jsp api's to convert the jsp file into html file. The reason is lot of data is dynamically generated in the jsp file, i need to use this and convert it into html file and attach that file into my email. Is there a way to do this? If not found in jsp api's, is there any other way to do this?
Thank you,
Appreciated your response on this.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Mandy
A JSP is desinged to send data to the browser in the form of HTML, not to neccesarily create an HTML file. To do something like that you could have a servlet or a bean process the data and just generate a file that can be included in an email.


Dave
Mandy S Smith
Greenhorn

Joined: Jan 20, 2002
Posts: 24
Thanks Dave for your quick reply. I understand what you are saying, but thought there could be something simple that could write out just the html stuff.
I might have to end up doing like what you mentioned, to write out all the stuff using a servlet or some class into a file, which can used as an attachment file.
Thank you.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Originally posted by Mandy S Smith:
... something simple that could write out just the html stuff.

I'm not sure what you mean by write it out? In order to attach it to an email it needs to be in a separate file. If you mean to write the html directly into the email then you might want to look at the javaMail API. I've not worked with it myself but it should be a fairly easy thing to create the message content to include HTML tags.
Mandy S Smith
Greenhorn

Joined: Jan 20, 2002
Posts: 24
I have a Email class(Uses JAVA MAIL) which can handle html tags in its body. What i meant by writing out is , either i can write the html tags into a separate file or append to a stringBuffer and pass it on to my email class.
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jsp to html
 
Similar Threads
How to convert JSP into a txt or html file?
Can I convert a Jsp to XML
convert html to an image
jsp to xml
pdf to html with java