Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Newbie Navigation Question

 
Ranch Hand
Posts: 100
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys,

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,

Chris
 
Saloon Keeper
Posts: 25466
180
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.
 
He's giving us the slip! Quick! Grab this tiny ad!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic