users@javaserverfaces.java.net

Re: Exception handling in JSF

From: Lars R. <lars.rosenquist_at_alyssar.nl>
Date: Fri, 7 Mar 2008 05:27:43 -0800 (PST)

That's because the implicit exception property is not set. You must
explicitly store the exception in session and get it out from your
errorHandler.jsp page. Either store it directly in session or use
session-scoped bean (which would require your page backing bean to have
knowledge of the error page backing bean, which may not be what you want).


java_buff wrote:
>
> Roger,
> thanks for the quick reply..
> I had tried doing that too. the application correctly navigates to that
> page also. But from the errorHandler.jsp page i am calling a
> handleException method from my exceptionUtils class.
> I am passing the implicit "exception" jsp object to this handleException
> method. But the method is getting that object as null.
> I am clueless about it. Can you please help me on this?
>
>
>
> Roger Kitain wrote:
>>
>> 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?
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net
>>
>>
>>
>
>

-- 
View this message in context: http://www.nabble.com/Exception-handling-in-JSF-tp15829209p15891240.html
Sent from the javaserverfaces users mailing list archive at Nabble.com.