File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

send a jsp page on to email

 
Ali Khalfan
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!!
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic