This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JSF and the fly likes How to include errorpage in xhtml page. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Reply locked New topic

How to include errorpage in xhtml page.

shree lk

Joined: Mar 16, 2011
Posts: 14

Hi All,

I want to include errorPage in .xtml, as done in jsp i.e inclusion of error page using "iserrorPage" and "errorPage". How it can be done in xhtml page.

Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16897

You cannot use a JSF View as a JSP-type error page. That's because the error page mechanism works by internal access to webapp resources and doesn't invoke the FacesServet (without which no JSF View will properly function).

ErrorPages are not a good choice for ordinary application error display. For that, it's better just to use the JSF page navigator to route to a JSF error page, which is just an ordinary JSF page that displays whatever error messages and advice you want.

Use the J2EE error pages to customize the display that the user gets when a bug causes normal JSF processing to fail. Code them as ordinary JSPs that link back to the mainstream JSF views.

Customer surveys are for companies who didn't pay proper attention to begin with.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63052

Please do not post the same question more than once.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: How to include errorpage in xhtml page.
It's not a secret anymore!