• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

how to handle errors in JSF

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic