File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 17421

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.

An IDE is no substitute for an Intelligent Developer.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

Please do not post the same question more than once.

[Asking smart questions] [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!