render jsp to send in javamail

M

Mark

Hi all,

Just wondering if anyone knew of a way to render the output of a jsp
page without printing it to the browser and then send that html as a
message through javamail... i.e. An invoice part of a web app that
allows you to either see your invoice through the browser or have it
sent to you via email. The invoice is presented to the browser as a
jsp page. I would like to send that same jsp page, after it has been
rendered, via email. I am trying to accomplish this in a Struts
application, so I would probably have an ActionServlet try and
accomplish this and then forward the user to a confirmation page.

Thanks in advance,

Mark
 
F

F

Mark said:
Hi all,

Just wondering if anyone knew of a way to render the output of a jsp
page without printing it to the browser and then send that html as a
message through javamail... i.e. An invoice part of a web app that
allows you to either see your invoice through the browser or have it
sent to you via email. The invoice is presented to the browser as a
jsp page. I would like to send that same jsp page, after it has been
rendered, via email. I am trying to accomplish this in a Struts
application, so I would probably have an ActionServlet try and
accomplish this and then forward the user to a confirmation page.
Can't you just call your JSP from anywhere in your application and
fetch the result using java.net.URL? Isn't that easier? You can
just call a servlet or JSP which first calls the JSP to fetch
the HTML, mail it and then redirect to that JSP.

F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top