File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How use web.xml to set error page to grab all exceptions?