tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Dynamic Email
Date Thu, 15 Nov 2001 11:48:35 GMT

	Here's an idea.  Its sketched out in Java, but most technologies
would work.

	Use HttpURLConnection to open the page you want (i.e. request the
page through the Tomcat server).  Copy the result text into the body of the
email message.  Send the email message.

	Randy


> -----Original Message-----
> From: Timothy Shadel [mailto:shadeltd@mtc.byu.edu]
> Sent: Wednesday, November 14, 2001 5:59 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Dynamic Email
> 
> 
> 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
> 
> >>> kevin@atg.ca 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:shadeltd@mtc.byu.edu] 
> > Sent: Wednesday, November 14, 2001 4:42 PM
> > To: tomcat-user@jakarta.apache.org 
> > 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:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list: 
> <mailto:tomcat-user-owner@jakarta.apache.org>
> >
> 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message