Is there any recommended approach to catching exceptions thrown by servlet filters, in the literal sense, not just an error-page forward? Specifically, I am using the jCIFS NTLM authentication filter (http://jcifs.samba.org/src/docs/ntlmhttpauth.html) and want to catch exceptions such as java.net.UnknownHostException thrown when one of the filters' arguments is invalid. I want to catch exceptions thrown by servlet filters, log them, and then forward to an appropriate error page. Any recommendations? Thanks, Jeff
When you say error handler, are you referring to the error-page web.xml definition? If so, this is not quite what I am looking for. Error-page simply forwards the request to some URL but doesn't forward the exception with it (or does it?). I need the ability to log the exception first then forward to some URL. What were you referring to? Thanks, Jeff
Joined: May 03, 2004
I see that attributes with keys that start with "javax.servlet.error" are forwarded in the request object to the target of the <error-page>. I'll just use the information provided by those attributes to create a log entry. Thanks.