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


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


          網站導航:
           

          My Links

          Blog Stats

          常用鏈接

          留言簿

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 登封市| 正定县| 波密县| 青龙| 石狮市| 阿瓦提县| 泌阳县| 乌拉特中旗| 葫芦岛市| 雷波县| 西和县| 江西省| 双鸭山市| 田东县| 华容县| 渝中区| 安龙县| 黔西县| 龙口市| 苏州市| 堆龙德庆县| 富宁县| 嘉禾县| 杭州市| 玉屏| 郴州市| 泗阳县| 峨眉山市| 富阳市| 松潘县| 衡山县| 庄河市| 绥宁县| 纳雍县| 关岭| 昌黎县| 浙江省| 宜春市| 营山县| 巩留县| 汾阳市|