Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to handle errors in JSF

 
u sandhya
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic