看看一段jsp登录代码
while(rs.next())
{ String strstr=rs.getString(1);
out.print(buttonName);
out.print(strstr);
out.print(buttonPass);
if(strstr.equals(buttonPass))
{out.print(buttonPass);
response.sendRedirect("Nteacher.jsp");
}
else{out.print("it is wrong"); }
}
}
catch(SQLException e){System.out.print(e);}
其中butonName 是用户输入的用户名
strstr是数据库里返回的拥护密码
buttonPass 是拥护输入的密码,
已经输出来strstr和buttonpass的值一样
可结果是
apple pple pple it is wrong
怎么就不跳转呀,一夜拉,救救我吧
{ String strstr=rs.getString(1);
out.print(buttonName);
out.print(strstr);
out.print(buttonPass);
if(strstr.equals(buttonPass))
{out.print(buttonPass);
response.sendRedirect("Nteacher.jsp");
}
else{out.print("it is wrong"); }
}
}
catch(SQLException e){System.out.print(e);}
其中butonName 是用户输入的用户名
strstr是数据库里返回的拥护密码
buttonPass 是拥护输入的密码,
已经输出来strstr和buttonpass的值一样
可结果是
apple pple pple it is wrong
怎么就不跳转呀,一夜拉,救救我吧
...全文
相关推荐
JSP管理员登录_session
JSP管理员登录_session,JSP管理员登录_session
登录界面用JSP编写的
简单的登录界面新手学习,不好请大家谅解!
登录servlet+jsp+mysql
jsp页面没有过多的修饰 只是添加了必要的信息 使用的是mvc思想 清晰明了 有代码注释
jsp+Servlet实现简单的登陆
Servlet+Jsp实现简单的登陆,HttpSession session = request.getSession();
简单的JSP+Servlet 用户登录与注册
很简答的一个WEB 用户登录与注册验证。用tomcat发布,实现用户登录,注册的简单功能,适合初学者


Web 开发
