Thursday, March 28, 2002 01:23 PM
You have to capture the output of the JSP page.
If this is from generic Java code, make a connection to your server and capture the page. The HttpClient package in the Jakarta Commons project may be helpful.
If this is from another Servlet or JSP, you can pass a wrapped response (created using HttpResponseWrapper) to a RequestDispatcher.include() and capture then JSP output to a StringWriter or ByteArrayOutputStream.
In either case, just attach the output as an HTML attachment.