dcsimg
How can the output stream generated by a JSP bound...
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Cacioppo
Posted On:   Saturday, November 11, 2000 01:51 PM

How can the output stream generated by a JSP bound for the browser be intercepted and written to a local file. For example, I want to capture the output of a form generated by a JSP and later email it to a different department.

Re: How can the output stream generated by a JSP bound...

Posted By:   AlessandroA_Garbagnati  
Posted On:   Monday, March 26, 2001 04:46 PM

There are different solutions.


If the servlet container is working with Servlet 2.3 you can write a Filter (one of the new features of Servlet 2.3).


Another solution could be write a JSP Tag that extends BodyTag that writes the content of the bodyContent object and writes it to a file. The 'original' jsp page will be included inside this tag:

<%@ taglib uri="..." prefix="capture"%>

... original jsp file ...



These are two solutions, but I think that there are many other valid solutions.
About | Sitemap | Contact