• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Newbie Navigation Question

Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,

Saloon Keeper
Posts: 27889
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic