i have a program whatever i write the code in else loop it is not working. String s = request.getParameter("username"); String pass=request.getParameter("password"); out.println("username"+"<br>"+s); out.println("pass"+"<br>"+pass); String pwd=null; Statement st=null; ResultSet rs=null; Connection con=null; ConnectionBean1 cb = new ConnectionBean1(); con = cb.getConnection();
String str="select password,status from login where username='"+ s +"' and password='"+pass+"' "; out.println(str); st =con.createStatement(); rs=st.executeQuery(str);
while (rs.next()) { stat=rs.getString("status"); pwd=rs.getString("password");