Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with attributes backing bean  RSS feed

 
cesar vasde
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You see, I have the following exceptions


This is the bean



faces-config.xml



The values that print in console are:

user: null
pass: null

As you can see, the fields of backing bean are null even though the xhtml page I put some value on them


What do you think is the problem?

 
Tim Holloway
Bartender
Posts: 18660
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are getting the NullPointerException because you are attempting to invoke the equals() method on something that you already know is a null string (since you just printed it).

Normally, I'd expect the fields to be set to empty strings as part of the JSF request process, but you didn't include the actual page definition, so I can't tell whether you have your page form setup properly.

Aside from that, the technical name for "user-defined login" is Security Hole.
 
naveen gupta
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The values you are entering in the GUI are not getting stored in the variables you defined in the backing bean
Put up some log statements and work in that direction to see why the values are not getting entered in the variables of JSF backing bean
best of luck
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!