Forums Register Login

Newbie Navigation Question

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 781 times.
Similar Threads
customerDAO returning NPE error
JSF2 Error
Target Unreachable, identifier resolved to null (JSF 2.0)
Update a Registration page using JSF and MySQL Database.
Still struggling to get started with JSF.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:11:43.