I throw custom exception in runtime and try to catch it by servlet container (error-page in web.xml). But I see that there is no page redirection. I have told with Glassfish developers and they answered:
SRV 9.9.2:
If no error-page declaration containing an exception-type fits using the
class-hierarchy match, and the exception thrown is a ServletException or
subclass thereof, the container extracts the wrapped exception, as defined by the ServletException.getRootCause method. A second pass is made over the error page declarations, again attempting the match against the error page declarations, but using the wrapped exception instead.
But I see in stack trace, that there is a javax.faces.el.EvaluationException (subclass of RuntimeException) this root cause of my exception. And it cannot be executed right by container. I use JSF 1.2_04 p02 RI. To tell the truth I don't know is it a bug and who must fix it this way.
[Message sent by forum member 'alexanderibelov' (alexanderibelov)]
http://forums.java.net/jive/thread.jspa?messageID=230604