I want to save the HTML file which is generated by the JSP at the server side.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   bhupendra_singh
Posted On:   Thursday, April 19, 2001 10:06 PM

How can I save the HTML generated by a JSP page at the server side. Actually I want to send the HTML file generated by a JSP as an atttachment of a mail to a third person. So I am thinking of first saving the HTML at the server side in some folder and then send that file as an attachment.
Can it be done by some other way using JSP....

Re: I want to save the HTML file which is generated by the JSP at the server side.

Posted By:   AlessandroA_Garbagnati  
Posted On:   Thursday, April 19, 2001 10:20 PM

Well, the best solution for this is on its way. The new Servlets 2.3 specification will add Filtering that could be the perfect solution to your problem.


I had a similar problem a few months ago and I've developed a simple custom tag that 'wrapped' the file to be saved. The tag was reading the requested page throught a <%@ page include...%> ( cannot be used) and then using the body content inside the tag, I had access to the full html output.


Another possible solution is throught a URLConnection object.

About | Sitemap | Contact