Package javax.servlet.http

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


        uuidCookie = getUuidCookie(request);
        //������sessionֵ���ڣ���cookieֵҲ���ڲ���Ч
        //(��Ҫ��Լ�Ⱥ�����£��û���s1ע���ˣ�������������s2ʱ������ʾ��¼״̬)
        if(uuidCookie!=null)
          return user;
        ssn.invalidate();
        return null;
      }
    }
    String uuid = null;
    if(uuidCookie == null)
View Full Code Here


    RequestUtils.setCookie(req, res, COOKIE_LASTLOGIN_KEY, "", 0);

    // ���session
    HttpSession ssn = req.getSession(false);
    if (ssn != null) {
      ssn.invalidate();
    }
  }

  /**
   * ע���û�
 
View Full Code Here

    try
    {
      HttpSession session = request.getSession();
     
      if (session != null){
        session.invalidate();
      }
    }catch(java.lang.IllegalStateException e){
      // ok, if an exception occurs, there's nothing we can really do
      // so just print an error to the log and redirect to the login page
      System.out.println("[Exception][LogoutHandler] Exception thrown in execute(): " + e);
View Full Code Here

      {
        userTimer.cancel();
      }
      if (session != null)
      {
        session.invalidate();
      }
    } catch(java.lang.IllegalStateException e) {
      // ok, if an exception occurs, there's nothing we can really do
      // so just print an error to the log and redirect to the login page
      logger.error("[execute] Exception thrown.", e);
View Full Code Here

    try
    {
      HttpSession session = request.getSession();
      if (session != null)
      {
        session.invalidate();
      }
    }catch(Exception e){
      System.out.println("[Exception][CV LogoutHandler] Exception thrown in execute(): " + e);
      e.printStackTrace();
    }
View Full Code Here

      if (actionType.equals(I_XmlBlasterAccessRaw.CREATE_SESSIONID_NAME) || // Initial dummy request to create a http-sessionId and bounce it back to the applet/browser
          actionType.equals(I_XmlBlasterAccessRaw.CONNECT_NAME)) { // "connect" TODO: !!! Reconnect to old session
         boolean invalidate = getParameter(req, "xmlBlaster/invalidate", false);
         if (invalidate == true) {
            log.info("Entering servlet doGet("+I_XmlBlasterAccessRaw.CONNECT_NAME+"), forcing a new sessionId");
            session.invalidate();   // force a new sessionId
         }
         session = req.getSession(true);
      }
     
      String sessionId = session.getId();
View Full Code Here

      if (bi != null)
        bi.shutdown();
     
      HttpSession session = req.getSession(false);
      if (session != null)
        session.invalidate();
    } catch (Throwable e) {
      log(e.toString());
    }
  }
View Full Code Here

              try {
                SessionInfo sessionInfo = session.getSessionInfo();
                if (sessionInfo!=null) {
                  HttpSession session2 = sessionInfo.getSession();
                  if (session2!=null) {
                    session2.invalidate();
                  }
                }
              } catch (IllegalStateException ise) {
                // ignore since session already closed by user, see javadoc:
                // "    Throws: java.lang.IllegalStateException - if this method is called on an already invalidated session"
View Full Code Here

        SessionInfo sessionInfo = usess.getSessionInfo();
        if (sessionInfo!=null) {
          HttpSession session = sessionInfo.getSession();
          if (session!=null) {
            try{
              session.invalidate();
            } catch(IllegalStateException ise) {
              // thrown when session already invalidated. fine. ignore.
            }
          }
        }
View Full Code Here

        SessionInfo sessInfo = usess.getSessionInfo();
        if (usess.isAuthenticated()) {
          HttpSession session = sessInfo.getSession();
          if (session!=null) {
            try{
              session.invalidate();
            } catch(IllegalStateException ise) {
              // thrown when session already invalidated. fine. ignore.
            }
          }
          showInfo("sess.kill.done", sessInfo.getLogin() );
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.