Package javax.servlet.http

Examples of javax.servlet.http.HttpSession.invalidate()


    httpSession.setAttribute("username", username);
   
    // setup the mapping of user names to CometSessions
    if (users.putIfAbsent(username, cometSession) != null) {
      // some one else has already logged in with this user name
      httpSession.invalidate();
      throw new ChatException("User: " + username + " already logged in");
    }
  }
 
  /**
 
View Full Code Here


      throw new ChatException("User: " + username + " is not logged in on this session");
    }
   
    // remove the mapping of user name to CometSession
    users.remove(username, cometSession);
    httpSession.invalidate();
  }
 
  /**
   * @see net.zschech.gwt.chat.client.ChatService#send(java.lang.String)
   */
 
View Full Code Here

                loginForm.setMemberUserName(token.getMemberUserName());
                loginForm.setMemberPassword("");
                loginForm.setMemberTempPassword("");
                loginForm.setMemberPasswordConfirm("");               
                
                session.invalidate();
                    errors.add(BaseConstants.INFO_KEY, new ActionMessage("errors.login.resetpassword"));
                    saveMessages(request, errors);
                    accessHistory.setLoginStatus(BaseConstants.LOGIN_FAIL);
                    accessHistory.setReasonCode(ReasonCodes.CHANGE_PASSWORD);
                  securityService.addAccessTrail(accessHistory);
View Full Code Here

             
             
          } catch (UserAccountException e) {
            //token.setLoginSuccessfull(false);
              if (e.getExceptionReason() == NotLoginException.ACCOUNT_DEACTIVATED) {
                  session.invalidate();
                  errors.add(BaseConstants.WARN_KEY, new ActionMessage("errors.account.deactivated"));
                  saveMessages(request, errors);
                  logger.info("ACCOUNT DEACTIVATED : " + username);
                    accessHistory.setLoginStatus(BaseConstants.LOGIN_FAIL);
                    accessHistory.setReasonCode(ReasonCodes.ACCOUNT_DEACTIVATED);
View Full Code Here

                    accessHistory.setReasonCode(ReasonCodes.ACCOUNT_DEACTIVATED);
                securityService.addAccessTrail(accessHistory);
                  return mapping.getInputForward();
              }  
              if (e.getExceptionReason() == NotLoginException.ACCOUNT_DELETED) {
                  session.invalidate();
                  errors.add(BaseConstants.WARN_KEY, new ActionMessage("errors.account.deleted"));
                  saveMessages(request, errors);
                    accessHistory.setLoginStatus(BaseConstants.LOGIN_FAIL);
                    accessHistory.setReasonCode(ReasonCodes.ACCOUNT_DELETED);
                securityService.addAccessTrail(accessHistory);
View Full Code Here

                    accessHistory.setReasonCode(ReasonCodes.ACCOUNT_DELETED);
                securityService.addAccessTrail(accessHistory);
                  return mapping.getInputForward();
              }              
              if (e.getExceptionReason() == NotLoginException.ACCOUNT_LOCKED) {
                  session.invalidate();
                  errors.add(BaseConstants.WARN_KEY, new ActionMessage("errors.account.locked"));
                  saveMessages(request, errors);
                  logger.info("ACCOUNT LOCKED : " + username);
                    accessHistory.setLoginStatus(BaseConstants.LOGIN_FAIL);
                    accessHistory.setReasonCode(ReasonCodes.ACCOUNT_LOCKED);
View Full Code Here

                      logger.warn(username + " : User has exceeded maximum number of login attempts");
                      logger.warn("User account has been disabled. Please contact System Administrator");
 
                      // deactivating user account
                      if (securityService.lockMemberAccount(username)) {
                          session.invalidate();
                          errors.add(BaseConstants.WARN_KEY, new ActionMessage("errors.account.locked"));
                          logger.info("ACCOUNT LOCKED :  IP: (" + currentIP + ") " + username);
                          accessHistory.setLoginStatus(BaseConstants.LOGIN_FAIL);
                          accessHistory.setReasonCode(ReasonCodes.ACCOUNT_LOCKED);
                      securityService.addAccessTrail(accessHistory);
View Full Code Here

         
          if (token.isLoginSuccessfull()) {
              //clear out any old session info
              session = request.getSession(false);
              if (session != null) {
                  session.invalidate();
              }
 
             
              // Create a new session for this user
              session = request.getSession(true)
View Full Code Here

     }
    
     if (session != null) {
         session.removeAttribute(BaseConstants.USER_CONTAINER);
         logger.info("User successfully logged out...");
         session.invalidate();
     }
    
     return (mapping.findForward(BaseConstants.FWD_SUCCESS));
  }
 
View Full Code Here

    @Test
    public void invalidate()
    {
        HttpSession hs = mockHttpSession();

        hs.invalidate();

        replay();

        Session session = new SessionImpl(null, hs);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.