One option is to use Java's URL capabilities and open a connection to
tomcat, make the request, and capture the output of that in a
ByteArrayOutputStream.  Something like this, though I did not even try to
compile it :

URL url = new URL(yourURL);
InputStream is = url.openStream();
ByteArrayOutputStream baos = new ByteArrayOutputStream();

/* then loop over the input stream into the output stream */

String html = baos.toString(); // voila

-----Original Message-----
From: NINA.de Internet Service Agentur [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 12, 2000 03:44 AM
To: [EMAIL PROTECTED]
Subject: Reroute the output of a processed jsp page into a String


Hello,

is it possible to reroute the output of a processed jsp page into a String
or
StringBuffer object in order to send it as an email message with the Java
Mail API?

We use Tomcat 3.2 final with beans and jsp pages and want to use the parse
mechanism
of jsp pages of Tomcat to generate user defined email messages. The contents
of the
messages are provided by beans with sessionwide scope.

Any ideas ?

Regards,
Ralf.D. Zimmerer




Reply via email to