| Author |
Sending JSP rendered html email from a Servlet
|
elnah
Greenhorn
Joined: Nov 04, 2004
Posts: 1
|
|
I am adding �email this page functionality� to an existing jsp/servlets based website. I can send html content without issue as long as it is written into the servlet sending the email. Is there a simple method for including the rendered html output from a jsp as the body of the html email? Or am I forced to reproduce the jsp pages as html for email? Any help would be appreciated as this seems like a problem that someone must have solved. Thanks in advance.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
"elnah", Welcome to JavaRanch! We're pleased to have you here with us in the Servlets forum, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks, Jeanne Forum Bartender [ November 04, 2004: Message edited by: Jeanne Boyarsky ]
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Jeroen Wenting
Ranch Hand
Joined: Oct 12, 2000
Posts: 5093
|
|
You can start an HTTP request to the JSP from your servlet and capture the output stream of the JSP into your email. You will have to figure out a way to strip the HTTP headers yourself, but that's easy. Hint: what does every HTML document start with?
|
42
|
 |
 |
|
|
subject: Sending JSP rendered html email from a Servlet
|
|
|