JDBC Connectivity Issue
I am trying to connect to mysql database through a servlet. This servlet tries to authenticate the user. The return value of the function authUser is always returning false.
On checking the catalina.out i see the following error
Could someone help me with this problem. I am getting a bit confused.
I think this may solve your problem (from the Java API docs.):
I think you are getting your error when you are calling rs.getInt(1) because you have not moved the cursor to the first row in the resultset. Even though you are expecting only one row in your resultset you still need to loop through it because of the initial cursor positioning.
Thanx a ton. Your solution works