<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<% String user=request.getParameter("user");
String password=request.getParameter("password");
if(("lixiaojun".equals(user))&&("20030621".equals(password))){
%>
<jsp:forward page="success.jsp">
<jsp:param name="user" value="<%=user%>"/>
</jsp:forward>
<%} %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>登录页面</title>
</head>
<body>
<table width="400" border="0" align="center" height="122">
<tbody><tr align="center">
<td>用户登陆</td></tr>
<%if(null!=user){
%>
<tr>
<td>用户名和密码不正确,请重新输入!</td>
</tr>
<%} %>
<form method="post" action="login.jsp">//提示标签放置位置不正确
<tr>
<td>用户名:<input type="text" name="user"></td>
</tr>
<tr>
<td>密 码:<input type="password" name="password"></td>
</tr>
<tr align="center">
<td><input type="submit" value="登录"/></td>
</tr>
</form> //提示没有开始的标签
</tbody>
</table>
</body>
</html>