aspose file tools*
The moose likes JSF and the fly likes how to handle errors in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "how to handle errors in JSF" Watch "how to handle errors in JSF" New topic
Author

how to handle errors in JSF

u sandhya
Greenhorn

Joined: Jan 08, 2006
Posts: 3
Hi,
i am facing problem in JSF in handling serverside errors.
For Ex:
If i have a JSF page, i want throw an serverside error in error page.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

What kind or error page are you talking about? Are you wanting to redirect to another page that contains the error, like a 404 error page? Or are you wanting to display simple "Error logging in" type error messages?


GenRocket - Experts at Building Test Data
u sandhya
Greenhorn

Joined: Jan 08, 2006
Posts: 3
Hi,
thanks for u r reply.
i want to redirect to another page,like 404, 505 errors.i can able to handle simple errors.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by u sandhya:
Hi,
thanks for u r reply.
i want to redirect to another page,like 404, 505 errors.i can able to handle simple errors.


I haven't really had to do too much with error pages like you are requesting, however, I would think that you still define the error page in your web.xml like so:



Is there something JSF specific about your error pages?
u sandhya
Greenhorn

Joined: Jan 08, 2006
Posts: 3
yes.It's a jsf specific.As u mentioned code ,that is already i tried.Thanks for u reply.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Originally posted by u sandhya:
yes.It's a jsf specific.As u mentioned code ,that is already i tried.Thanks for u reply.


What happened when you tried the code? Did you build the error page(s) just like you would a JSF page? I am not 100% sure how the life cycle is handled for error pages, but I would suspect they go through the same controller mechanism?
Kavitha Narayan
Greenhorn

Joined: Mar 08, 2006
Posts: 1
Hi,

This is also a similar question related to JSF error page redirection. I need to be redirected to the error page if there are any unhandled errors like 404 ,505 and i wish to have the stack trace also printed.

Thanks in advance...
Julia Roberts
Greenhorn

Joined: Dec 21, 2005
Posts: 3
Hey folks,
even i want to redirect my excpetions(like JDBC ones) to the error page and show the SQLExceptions.

Please let me know.

Thanks,
Julia
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to handle errors in JSF