users@javaserverfaces.java.net

Re: Exception handling in JSF

From: Roger Kitain <Roger.Kitain_at_Sun.COM>
Date: Tue, 04 Mar 2008 10:49:39 -0500

In your action handler method (that does business logic) you could set the
"outcome" to cause navigation to go to the error page when that exception
occurs.

-roger

java_buff wrote:
>
> This question has been asked time and again, without any clear answers to
> it. I would appreciate if some one can help me on this.
> I am developing a web application with the following architecture:
> JSF page calls backing bean methods which calls the service methods. Now my
> service methods can throw different exceptions like ValidationException,
> BusinessException, SystemException etc.
>
> Now, what i want to do is : If Validation/Business Exceptions are thrown
> show the error messages to the user on the same page from which the action
> was called. And if a SystemException is thrown navigate to a default error
> page.
>
> How can i handle this thing? Any clues?
>