81,094
社区成员
发帖
与我相关
我的任务
分享
<%@page contentType="text/html" import="java.util.*,java.lang.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%
if(request.getParameter("id").equals("admin")&&request.getParameter("password").equals("888888")){
response.sendRedirect("login.jsp");
}
else{
response.sendRedirect("error.jsp");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<tr><td>系统登陆</td></tr>
<form action="index.jsp" method="post"></form>
<tr>
<td>用户:</td>
<td><input type="text" name="id"></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td><input type="submit" value="登陆"></td>
</tr>
</body>
</body>
</html>
response.sendRedirect("login.jsp");