还是不行啊
代源如下:
<%@ page language="java"contentType="text/html;charset=GBK"%>
<%@ page import="org.ynw.*" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>执行登录</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<%
boolean flag=false;
PersonOperate p=new PersonOperate();
Person person=null;
person=p.queryById((String)request.getAttribute("id"));
if(person!=null &&person.getPassword().equals(request.getAttribute("password")))
{
session.setAttribute("uname",person.getName());
flag=true;
}
else
{
request.setAttribute("err","用户名不存在或密码错误");
}
%>
<%
if(flag)
{
%>
<jsp:forward page="login_success.jsp"/>
<%
}
else
{
%>
<jsp:forward page="login_failure.jsp"/>
<%
}
%>
</body>
</html:html>