This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line! See this thread for details.
HI I am trying to create a user check method by accessing database for my jsf application.
Can anybody tell me why i am getting login (i.e success output ) from code even when i enter wrong loginname and password?
I am trying to check whether the resultset is null or not?
If its null that is there is no record like that means fail (no login)
and if its not null that is success( successfull login)
Have a look at the ResultSet JavaDocs. You should see the method available to you. Alternatively you could change your sql to count the number of users that match your search criteria and check that.