webtier@glassfish.java.net

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

From: <webtier_at_javadesktop.org>
Date: Tue, 02 Feb 2010 23:48:51 PST

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