• Post Reply Bookmark Topic Watch Topic
  • New Topic

want to be notified if error occurs in prod

 
mary morris
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to come up with some ideas on how to send myself a message if in production, an error occurs. We currently have a customized page for servlet and jsp errors. But would then like to send a note to myself or somenone if there is a error. Any ideas or good reference on this. We also currently have a feedback form using jsp. Thanks for any ideas
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can certainly use the Java Mail API to send email if you can arrange access to a mail server. The best way to do this is to have the actual mail sending done in a separate process so that any hold-up in mailing won't interfere with the JSP engine.
In other words, you would compose an object containing the message contents and hand it to a mailing object that runs a separate Thread. You should also log the message in case the mail fails for any reason.
Bill
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The book:
Web development with JavaServer Pages.
Has the example you need. The book is good, so if you wanna buy it....
if you're interested in the code let me know..
cheers
 
mary morris
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replys and infor on the books. I would be interested in the code example from the book Web development with JavaServer Pages book.
also. I have many books on the subject not that one.
I am using the Java Mail API at this time.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!