File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this possible using JSP?

 
Curtis Nelson
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm pretty new to JSP, and was wondering if the following was possible. I would like to use JSP to create web pages, and then either have them displayed in a client browser, or simply created on the server and then e-mailed to a user. The idea is that we would e-mail the results to a customer for their own records, while our technicians would see the pages in their broswer. So, is it possible to 'redirect' the output from a JSP page to either a browser or a simple html file?

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can send email from Java. Look into the JavaMail API. A Google search for JavaMail will get you there quickly.
http://www.google.com/search?hl=en&lr=&q=JavaMail+&btnG=Search

You can also incorporate this into your JSPs if you like. You may want to factor the email code out to a JavaBean, but that's up to you.
http://www.google.com/search?hl=en&q=JavaMail+JSP+Example&btnG=Google+Search

Many App servers have conatiner managed email sessions that can be accessed via JNDI from your app. Tomcat does.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html


Good-Luck
-Ben
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic