登录
<form action="panduan.jsp">
用 户 ID : <input name="id" type="text" width="30"/>
<br><br>
用户密码: <input name="mima" type="password" width="30"/>
<br>
<input type="submit" value="登录">
</form>
判断
<%
String id = new String(request.getParameter("id"));
String mima = new String(request.getParameter("mima"));
String S1 = "11";
String S2 = "11";
if(id.equals(S1) && mima.equals(S2))
{out.print("登陆成功");}
else
{ response.sendRedirect("error.jsp"); }
%>
error
</head>
<%
response.setHeader("refresh","3;URL=denglu.jsp");
%>
</head>
<body>
账号或密码错误!
</body>