wood burning stoves
The moose likes JSF and the fly likes JSF2 Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF2 Error " Watch "JSF2 Error " New topic
Author

JSF2 Error

Jay Mack
Greenhorn

Joined: Feb 12, 2013
Posts: 2
I am new to JSF and am trying to work through the Core JavaServer Faces (3rd Edition) Book.

The first project is for a login page.

I can get the index.xhtml page to come up but when I enter the name and password I get this error

/index.xhtml @15,55 value="#{user.name}": Target Unreachable, identifier 'user' resolved to null

I have seen previous discussions on this but none of those solutions helped me.

this is my UserBean.java



My index.xhtml



my welcome.xhtml




Here is my web.xml



and my faces-config.xml



I am not sure where my error is. any help would be appreciated
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17038
    
  26

JSF often doesn't work well for login/loginfail, welcome, and other container-dispatched webpages. Actual behaviour seems to depend on the vendor and version of the appserver, but often these pages are dispatched directly by the server and don't go through the FacesServlet (Struts users have a similar problem).

The workaround is typically to make the welcome page be an HTML page that contains a redirect to the JSF page.


An IDE is no substitute for an Intelligent Developer.
Jay Mack
Greenhorn

Joined: Feb 12, 2013
Posts: 2
I decided to punt and completely rewrote it from a clean project.

I believe I did everything the same but it now works.

Thank you for the response.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JSF2 Error
 
It's not a secret anymore!