日期:2014-05-17 浏览次数:20609 次
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page errorPage="error.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ABC</title>
</head>
<body>
<center>
<% if(request.getMethod().equals("post")){%>
<%
System.out.println("1");
String username=null,pass=null;
username=request.getParameter("username");
pass=request.getParameter("password");
if((username!="admit")||(pass!="admit"))
{%>
<jsp:forward page="inputerror.jsp" />
<%}
else{
session.setAttribute("name",username);
session.setAttribute("word",pass);%>
<% String pageURL="index.jsp"; %>
<jsp:forward page="<%= pageURL %>" />
<%}}else{%>
<p1><font face="隶书" size=5>欢迎来到ABC管理系统</font></p1><br><br>
<form action="" method="post">
<table>
<tr>
<td align="left">用户名: </td><td><input type="text" name="username" size="25"></td>
</tr>
<tr>
<td align="left">密码: </td><td><input type="password" name="password" size="25"></td>
</tr>
<tr>
<td><input type="submit" value="提交"></td><td><input type="reset" value="重置"></td>
</tr>
</table>
</form>
<%} %>
</center>
</body>
</html>