This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes how to handle errors in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply 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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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?
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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to handle errors in JSF
 
Similar Threads
display:column + javascript
JSF : redirect errors to error page
h:messages prints error message twice on first submit
"Document is empty" error, what does it mean?
Radio button validation problem