This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to handle runtime ServletException? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to handle runtime ServletException?" Watch "How to handle runtime ServletException?" New topic

How to handle runtime ServletException?

yoginee Pathak

Joined: Apr 25, 2001
Posts: 3
Hi all,
Could anybody help me by telling how to handle runtime SevletException?
Thank you
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12982
The most important thing is to get the maximum amount of informaton from the exception. Your servlet engine is probably going to log the stack trace, so be sure to preserve the error log.
Note that ServletException can be thrown with a "root cause" Throwable attached - if you are catching ServletException, use getRootCause() and print the stack trace of that Throwable.
Don't get me started about those stupid light bulbs.
subject: How to handle runtime ServletException?
It's not a secret anymore!