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: Wed, 3 Feb 2010 17:59:53 -0500

I've found that the Filter solution is the easiest and least hacky. I
wouldn't bother with the JSF Exception handler if you can avoid it. It's a
lot more work than a 5 line filter :)

On Wed, Feb 3, 2010 at 2:48 AM, <webtier_at_javadesktop.org> wrote:

> Ok, I found out one of my problems - if I set the project stage to
> Development, my exception gets swallowed. So changing it to Production at
> least allows a filter to catch it.
>
> The main reason for my question is that with JSF2 there is so much error
> handling/system event stuff in there that it seems a "hack" to do it via a
> filter. Obviously it can be processed and an error page sent back - heck,
> when you set the stage to "Development" a custom error page comes up.
> However it's not my error page, which is the issue.
>
> Has anybody tried just using the stuff already in JSF2 to do this, or knows
> how the RI does it so I can do something similar? It just seems a shame to
> keep using the same hacks used in the past when I'm sure I'm just missing
> something simple or obvious or both! These error handling classes were
> pushed as one of the great new features of JSF2, I just need to use how to
> use them properly!
>
> Thanks,
>
> Ian
> [Message sent by forum member 'hirowla' (ian.rowlands_at_three.com.au)]
>
> http://forums.java.net/jive/thread.jspa?messageID=384425
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"