File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes send a jsp page on to email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "send a jsp page on to email" Watch "send a jsp page on to email" New topic
Author

send a jsp page on to email

Ali Khalfan
Ranch Hand

Joined: Nov 03, 2007
Posts: 126
Hi,

I've displayed some output on a jsp page that i want to send as an email. I think it's more logical to send the jsp page by email rather then send it in a servlet because it's relted to the view side.

I've tried to fiddle around the apache mailer tag without success (tied to do the following)




this just displays an empy page and it seems no action is taken (no error in the logs either)


what works for me is sending an email in a servlet...but i have a problem there beause i don't want to print the jsp output in a servlet (looks real ugly) and i still believe this should be done feom a jsp page


ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403
Check weather taglib is configured properly in web.xml

check for below lines.

<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/mailer-1.1</taglib-uri>
<taglib-location>/WEB-INF/mailer.tld</taglib-location>
</taglib>

also, reckon that email smtp server is configured, you need a mail server, or use GMAIL SMTP to send email.

Cheers!!!


Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Vikas Kapoor
Ranch Hand

Joined: Aug 16, 2007
Posts: 1374
Do you mean you want to pass some information to user through Email?. Use Activation link, New Offers for example.
I don't have any idea about apache mailer but you can try Java Mail API and see how you can include HTML and attachments.
Ali Khalfan
Ranch Hand

Joined: Nov 03, 2007
Posts: 126
hi,

I am already using java mail (in a servlet) and it works fine....but look at the way i'm generating the output




This is not the best way to generate an output and its a violation of the MVC architecture, but currently i have no choice.



ujjwal ,

I already have the taglibs included in the web.xml file, and as your can i have included google's smtp server (trhough port 465), but it doesn't work right......




 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: send a jsp page on to email