Tomcat Exception-Type Ignoring Specific Exception for More General
- by David Marks
For one type of exception, IOException, I want to display one page. For all other exceptions I have a default error page. In my web.xml I have things setup like this:
java.io.IOException
/queryException.jsp
java.lang.Exception
/error.jsp
The problem is the error.jsp is the only page that ever shows, even if an IOException is thrown. The order the tags appear in doesn't matter; if I remove the java.lang.Exception tag though, I can get queryException to show for IOExceptions. What is the solution here? How can I keep a general error page for all exceptions EXCEPT for those with specific pages?