I am trying to create a login page asking user for username and password, once submitted i am passing this info to servlet which will connect to database and check if login id and password is correct or not... here is my servlet code:
I know i should be using post instead of get ...but i was having some problem in using that that i ll resolve later... as of now now my problem is that the above code is conneccting to database but not giving the desired output... ie if i remove line
" if (username.equals(rs.getString("name"))) "
(in while statement) it is giving names of all users in database ... but no output otherwise... please help...
I know i should be using post instead of get ...but i was having some problem in using that that i ll resolve later... as of now now my problem is that the above code is conneccting to database but not giving the desired output... ie if i remove line
" if (username.equals(rs.getString("name"))) "
(in while statement) it is giving names of all users in database ... but no output otherwise... please help...