Hibernate:
select
users0_.uid as uid1_1_,
users0_.username as username2_1_,
users0_.password as password3_1_
from
USERS users0_
where
users0_.username=?
and users0_.password=?
<package name="users" namespace="/users" extends="default">
<action name="*_*" class="action.{1}Action" method="{2}">
<result name="login_success">/users/Users_login_success.jsp</result>
<result name="login_failure">/users/Users_login.jsp</result>
</action>
</package>
public String login() {
UserDAO udao = new UserDAOImpl();
if (udao.userLogin(user)) {
return "login_success";
} else {
return "login_failure";
}
}
<form name="loginForm" action="<%=path%>/users/Users_login.action" method="post">
不管输入正确的账号和密码还是错误的,都是停留在登录界面
静以修身淡以明志
younghu
相关分类