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 消防員 閱讀(73) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 宁化县| 海晏县| 平湖市| 海口市| 汶川县| 罗山县| 山东| 鹰潭市| 长垣县| 台东市| 苏尼特右旗| 永胜县| 若羌县| 清原| 鹤庆县| 仪陇县| 雅江县| 沙坪坝区| 岐山县| 甘洛县| 普陀区| 同德县| 江口县| 黄浦区| 桓仁| 贵溪市| 城步| 原阳县| 库尔勒市| 玉山县| 西盟| 普兰店市| 博湖县| 辽源市| 镇平县| 兰考县| 乐至县| 邵东县| 自治县| 江安县| 钟山县|