I'd like to get an email when an error or exception happen in my web application, so that i can do the fix quickly.I've set a JSP error page. I like to show the error page to the client and at the same time get an email. I use jsp and a corresponding servlet and controller for each jsp.
How can i call the servlet to send email when the error or exception occurs? How is the configuration in web.xml?
Please help.
You can code your own solution, or you could use the email options in the standard logging packages out there. For example, log4j has SMTPAppender which will do what you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With