This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Newbie Navigation Question  RSS feed

Chris Bicnal
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm starting to play with JSF and am having some problems getting what I think is basic navigation to work.

I have a 'home' page which I want people to either navigate to a register or login page. Ideally I'd like to use JSF's navigation-rule approach (in faces-config) to do this. Ultimately my goal here is to compare native JSF's navigation model with Struts2.

Annyway, I have the following JSF page....

...and the following faces-config....

...but whenever I try to deploy GlassFish gives me a "com.sun.faces.config.ConfigurationException: Unable to parse document 'jndi:/server/Retire%20Early%20Inc-war/WEB-INF/faces-config.xml': null" error.

What am I missing here? Is is mandatory for me to have a managed bean behind each page? Or am I missing something in faces-config?

Thanks in advance,

Tim Holloway
Posts: 18531
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what the jndi thing is all about, but the navigation view IDs are supposed to be JSF URLs, not resource file names. So for a typical JSF configuration, the rule:

Should actually be:

"JSF URLs" are rather limited. You cannot navigate to/from non-JSF Views using them and they cannot contain references to servers or ports. They are defined relative to the base of the JSF web application.

DOCTYPE isn't applicable to JSF2. It's XML schema based. Also, standard security warning: write your own login, expect to get pwned. J2EE has a secure login system already built into it and at least 95% of the time, it's sufficient to handle a web applications front-line security.

Not all web application servers/versions like the welcome page to be a JSF page, incidentally, since pages dispatched directly by the appserver (welcome page, login/loginfail page and error pages) may not get routed through the FacesServlet. What I generally do is make a welcome jsp or html page that has a redirect to the JSF welcome page.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!