• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

want to be notified if error occurs in prod

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
There are no more "hours", it's centi-days. They say it's better, but this tiny ad says it's stupid:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic