<%@ page language="java" contentType="text/html;charset=GBK" errorPage="error.jsp"%>
<%
	int flag = 0;
	String username = request.getParameter("username");
	String password = request.getParameter("password");
	
	if(username!=null&&password!=null)
	{
		if(username.equals("admin")&&password.equals("admin"))
		{
			flag = 1;
		}else{
			flag = -1;
		}
	}
	
%>
<html>
<head>
<title>表单方式验证</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="F7FCFE" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br><br><br><br><br><br><br><br><br><br><br><br>
<center>
<font color=red size=5>
表单方式验证
</font>
</center>
<form name="form1" method="post" action="login.jsp">
<table width="800" border="0" cellspacing="0" cellpadding="0">
<center>
<tr> 
<td width="600" height="18" bgcolor="F7FCFE">&nbsp;</td>
<td width="200" height="18" bgcolor="F7FCFE">用户名：</td>
<td width="400" height="18" bgcolor="F7FCFE">
<input name="username" type="text" size="20">
</td>
</tr>
<tr> 
<td width="600" height="18" bgcolor="F7FCFE">&nbsp;</td>
<td width="200" height="18" bgcolor="F7FCFE" class="s">密 码：</td>
<td width="400" height="18" bgcolor="F7FCFE">
<input name="password" type="password" size="20">
</td>
</table>
<br><br><br><br>
<center>
<input name="提交" type="submit" >
<input name="重填" type="reset" >
</center>
</form>
</body>
</html>

