Hi,

I'd like to generate dynamic e-mail content, typically based on some parameters stored 
in the current HttpSession.  JSP seems like a great tool for this.  I can easily edit 
the "static" portion of the e-mail, and have non-technical personnel work with it.  
I'd get all the advantages JSP gives to dynamic HTML generation.  I can't seem to 
figure out a good way to do it, though.  I've tried to use the 
RequestDispactcher.include(), but there's no way to change the OutputStream to recover 
the content that was inadvertently streamed to the browser.  I can't wrap the 
request/response objects in the Servlet 2.2 spec (tomcat 3.x), and I'm not sure I'd 
know the details of how to even if I was running tomcat 4.0.  I tried creating a URL 
and calling getContent(), which returns a PushbackInputStream, but this works only 
sporadically.  Most of the time the buffer has been read completely, and I have no 
data with which to push it back.  All I want to do is load a JSP page, ensure that 
it's processed within the current Session and Request (so it has access to the needed 
variables), and then push that content into an e-mail message that I send using the 
JavaMail API.

I assume that somebody else has wanted this type of thing before.  If there's another 
solution to let end-users easily edit the static surroundings of dynamic e-mail 
content, where I can use templates, internationalization, and other great tools as 
easily as Struts, please let me know.

Thanks,

Tim


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to