Adam Brod wrote:
>
> Hi-
>
> We want to setup an error that will be shown anytime an exception
> bubbles up from the backend. Ideally, I would like to use a
> JSF/Facelets page so that I can have a nice look and feel, reusing our
> existing templates.
>
> Right now, I have configured our web.xml with the standard error page:
>
> <error-page>
> <exception-type>java.lang.Throwable</exception-type>
> <location>/error/error.faces</location>
> </error-page>
>
> I'm trying to avoid a redirect, but I'm having trouble.
>
> When I load error.faces by typing it into the browser, it works fine.
> When I get an exception during the RENDER phase, the error page works
> fine. However, when I encounter an exception on any page (say
> docList.faces) during the INVOKE_APPLICATION phase, I get some odd
> behavior. Basically, even though the servlet container is forwarding
> to error.faces, JSF tries to restore view and go through all the
> phases on docList.faces again before rendering error.faces. So the
> same exception is thrown during the second execution of
> INVOKE_APPLICATION and the error page is never displayed.
Out of curiousity, which container?
Just off the cuff though, I'd agree that it's odd that docList.faces
goes through restoration after the forward
to the error page. I'll reproduce locally on GF and see what happens.
>
> Do I have to use a redirect? Is there a more standard way to display
> an error page?
> *
> Adam Brod*/
> Product Development Team/
> Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.
>
>