建个login.jsp如下,红色部分根据自己需要改
<%@ page contentType="text/html;charset=GB2312"%>
<html>
<body>
<%
String pass=request.getParameter("password");
if (pass!=null){
if (pass.equals("
1234"))
response.sendRedirect("
http://127.0.0.1:8080/mysite/index.html");
}
%>
密码:
<form action="login.jsp" method="POST">
<input type=password name="password" size="15">
<input type="submit" value="go">
</form>
</body>
</html>