gogogo119

tt2

 1     public String doLoginAction() throws Exception {
 2         HttpServletResponse response = ServletActionContext.getResponse();
 3         response.setHeader("Pragma""No-cache");
 4         response.setHeader("Cache-Control""no-cache");
 5         response.setDateHeader("Expires"0);
 6         try {
 7             User loginUser = 
 8             UMUtils.getUserMgrLocal().login(user.getName(), user.getPassword().toCharArray());
 9             /** 这里还要判断用户是否有效 */
10             if (loginUser == null) {
11                 throw new Exception("用户名密码不正确,或者不在登陆有效期内,或已经被锁");
12             }
13             ActionContext.getContext().getSession().put(OrgConstants.SESSION_USER, loginUser);
14         } catch (Exception e) {
15             throw new Exception("用户名密码不正确,或者不在登陆有效期内,或已经被锁");
16   
17         }
18         return SUCCESS;
19     }
20 

posted on 2009-08-14 14:19 消防员 阅读(62) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 

My Links

Blog Stats

常用链接

留言簿

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜