aspose file tools*
The moose likes JSP and the fly likes How use web.xml to set error page to grab all exceptions? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How use web.xml to set error page to grab all exceptions?" Watch "How use web.xml to set error page to grab all exceptions?" New topic
Author

How use web.xml to set error page to grab all exceptions?

Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
I want to make sure that all exceptions go to this one page. Is the following the correct way?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
That's the correct way to catch CHECKED exceptions that are not handled within your code.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
thanks, 2 questions:
1. I am getting an error from my error page now (java.lang.IllegalStateException), any idea what I'm doing wrong?

2. Can you give me an example of an unchecked exception? How would I set the error page to handle those as well? Set it to handle RuntimeException?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How use web.xml to set error page to grab all exceptions?