errorPage directive works, but error-page in web.xml doesn't?
- by danb
I get jsp exceptions causing a forward to my error page when I put this at the top of my JSPs...
<%@ page errorPage="/error.page" %>
but when I try to do it globally with web.xml like so:
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error.page</location>
</error-page>
I just get a blank page... I've also tried putting /error.jsp in the location element.. but no love with that either..
I am triggering an exception with a jsp that just contains this:
<%if(true)throw new RuntimeException("test exception");%>
I do see the exception in the console from tomcat but I just can't get that error page to show without a directive on every jsp... am I missing something simple here?