webtier@glassfish.java.net

Re: [webtier] Re: What is the recommended way to catch exceptions and display an error page?

From: Lincoln Baxter, III <lincolnbaxter_at_gmail.com>
Date: Tue, 2 Feb 2010 21:37:56 -0500

I would suggest writing a Servlet Filter that simple continues onward in the
chain, catches all exceptions, and wraps them in one known exception,
re-throwing that known exception.

Once that is done, you can map that wrapper exception to the Error page,
which should do what you need - sending any Exception to the error page:

http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs81/webapp/web_xml.html#1017571

-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
On Tue, Feb 2, 2010 at 8:54 PM, <webtier_at_javadesktop.org> wrote:
> Thanks for the suggestion, but I have tried that. I think the Faces servlet
> is not passing it back up. I know it does things with the exception, but I
> don't know how to access it.
> [Message sent by forum member 'hirowla' (ian.rowlands_at_three.com.au)]
>
> http://forums.java.net/jive/thread.jspa?messageID=384390
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>