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

JSF2 Error

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27762
196
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
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.
 
Jay Mack
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
If you send is by car it's a shipment, but if by ship it's cargo. This tiny ad told me:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic