Thanks for the tip.  It looks like the developer's guide at 
http://jakarta.apache.org/velocity/developer-guide.html#Using%20Velocity%20In%20Servlets
 is going to give me the most options there.

I'd REALLY like to avoid training my group on ANOTHER view mechanism, and I'd like to 
take custom JSP tags that we write for initial use in HTML and reuse them in the 
dynamic e-mail.  I'm not satisfied that Velocity will be the best solution, though it 
seems to be a viable one.

Any other ideas of how to use JSP to generate dynamic e-mail content?

- Tim

>>> [EMAIL PROTECTED] 11/14/01 03:05PM >>>
Check out Velocity at apache.org

Kevin McBrearty
ATG Automation Technologies Group Ltd.
______________________________________

"A computer lets you make mistakes faster than any other invention in human
history, with the possible exception of handguns and tequila." - D.W.
McArthur

> -----Original Message-----
> From: Timothy Shadel [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, November 14, 2001 4:42 PM
> To: [EMAIL PROTECTED] 
> Subject: Dynamic Email
>
>
> 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]>
>


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



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

Reply via email to