日期:2014-05-17 浏览次数:20668 次
<%@page contentType="text/html;charset=UTF-8" %> <% request.setCharacterEncoding("UTF-8"); String name = (String)request.getParameter("username"); String password = (String)request.getParameter("password"); if(name==null||password==null){ out.print("<script>alert('用户名或密码不能为空!');</script>"); %> <jsp:forward page="login.jsp"/> <% } if(name.equals("samuelson")&&password.equals("000000")){ %> <jsp:forward page="success.jsp"/> <% }else{ //我这句话执行不出,怎么回事呢 out.print("<script>alert('用户名或密码错误!');</script>"); %> <jsp:forward page="login.jsp"/> <% } %>