Package javax.servlet.http

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


        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


    // if not, then do a s.removeAttribute....
    // next line fires a valueunbound event to UserSession, which does some
    // stuff on logout
    if (session != null) {
      try{
        session.invalidate();
        deleteShibsessionCookie(ureq);
      } catch(IllegalStateException ise) {
        // thrown when session already invalidated. fine. ignore.
      }
    }
View Full Code Here

        mLogger.debug("doLogout(req, res, root)");

        Element eRequest = getRequestElement(REQ_LOGOUT);
        HttpSession sess = req.getSession();
        if (sess.getAttribute(ATTR_USERNAME) != null) {
            sess.invalidate();
            eRequest.addContent(getStatusElement(STAT_OK));
        } else {
            eRequest.addContent(getStatusElement(STAT_INVALID_SESSION));
        }
View Full Code Here

    //XXX Must synchronize differently!!!
    synchronized (sess) {
      Relocatable.RelocatableService service = null;  
           
      if (destroySession) {      
        sess.invalidate();                   
        return;
      }
     
      if (sess.getAttribute(SESSION_SERVICE_KEY) == null) {
        log.debug("Created HTTP session '"+sess.getId()+"'");
View Full Code Here

        //Generate any messages required
        ServiceUtil.getMessages(request, callResult, null);

        // wipe the session
        if (("anonymous".equals(currentUser.getString("userLoginId"))) || (currentUser.getString("userLoginId")).equals(userLogin.getString("userLoginId"))) {
            session.invalidate();
        }
        //Determine whether it was a success or not
        if (callResult.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR)) {
            result = (String) callResult.get(ModelService.ERROR_MESSAGE);
            request.setAttribute("_ERROR_MESSAGE_", result);
View Full Code Here

        startVerification();

        ClusteredManager manager = newManager();
        Session session = manager.createSession(null);
        HttpSession httpSession = session.getSession();
        httpSession.invalidate();
    }
   
    public void testSessionEndAccessTriggersOnEndAccess() throws Exception {
        org.apache.geronimo.clustering.Session underlyingSession =recordCreateUnderlyingSession();
        underlyingSession.onEndAccess();
View Full Code Here

            // Session has not been registered on the session store
         }
         else if (!session.isValid())
         {
            // session is marked as invalid. invalidate this session now.
            httpSession.invalidate();
            beanManager.fireEvent(new SessionInvalidatedEvent(session));
         }
         else
         {
            session.updateSessionValues(httpSession);
View Full Code Here

    }
   
    //Invalidate the session and send a redirect to index.html
    public void logout() throws IOException {
        HttpSession session = (HttpSession) facesContext.getExternalContext().getSession(false);
        session.invalidate();
        HttpServletResponse response = (HttpServletResponse) facesContext.getExternalContext().getResponse();
        response.sendRedirect("index.html");
        facesContext.responseComplete();
    }
   
View Full Code Here

                                    e.printStackTrace();
                                }
                                System.out
                                        .println("Invalidating session from thread "
                                                + session.getId());
                                session.invalidate();
                                System.out
                                        .println("Invalidated session from thread "
                                                + session.getId());

                            }
View Full Code Here

                log("WARNING: can't invalidate null session " + sessionId);
              }
                continue;
            }
            try {
        session.invalidate();
        ++nbAffectedSessions;
              if (debug >= 1) {
                  log("Invalidating session id " + sessionId);
              }
      } catch (IllegalStateException ise) {
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.