tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Using Error Pages? : Still stuck... More info...
Date Thu, 19 Jul 2001 21:13:31 GMT

On Thu, 19 Jul 2001, Bragg, Casey wrote:

> I left some info out of my question...
> (BTW - the mailing list archive is filled with this question over and over
> with few solutions)
> My ROOT context has a valve entry in it.  The valve is running the
> sendError.
> The question :
>    Why does my custom 404 error page work, but my nearly identical 403 page
> does not work (I get the standard 403 message instead)?

This isn't going to work :-(

The reason is that Valves are processed *before* the webapp-related things
are, so things like error page directives are not invoked on the return
value from a Valve.

A possible alternative would be to implement your ManagerValve
functionality as a Filter instead.  That way, it would be processed
"inside" the webapp, and error pages would be applied.

As an extra added bonus, you would be portable to other containers as well


View raw message