Custom error pages can be configured in web.xml.
When I use a Filter that wraps the response, the usual mechanism for serving custom error pages goes haywire. Why?
GOOD:
No filter:
custom error pages served OK.
GOOD:
Filter added, but does no wrapping of the response:
custom error pages served OK.
GOOD:
Filter added, wraps response, and
*filter code itself* throws an error :
custom error pages served OK.
BAD:
Filter added, wraps response, and
code *other than filter code* throws an error :
custom error pages NOT served.
Instead, a generic server error page is served.
WRONG ANSWER:
"Configure a dispatcher element for ERROR."
No, doesn't fix. Doesn't even apply, since such config
refers to when to *apply* a filter, not how errors
themselves are handled.
(Using Servlet2.4, Tomcat 5.5)
How do I ensure that my custom error pages are always
served, regardless of what filters are active?
- Perplexed.