This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma 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 Java Interview Guide this week in the Jobs Discussion 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: 13037
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.
I agree. Here's the link:
subject: How to handle runtime ServletException?
It's not a secret anymore!