Forums Register Login

Jsp to html

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
 

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.
+Pie Number of slices to send: Send
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 carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1517 times.
Similar Threads
pdf to html with java
How to convert JSP into a txt or html file?
convert html to an image
jsp to xml
Can I convert a Jsp to XML
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:53:45.