Package javax.servlet.http

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


            HttpSession session = request.getSession(false);

            if (session != null) {
                logger.debug("Invalidating existing session");
                session.invalidate();
                request.getSession();
            }
        }

        return true;
View Full Code Here


        Assert.notNull(request, "HttpServletRequest required");
        if (invalidateHttpSession) {
            HttpSession session = request.getSession(false);
            if (session != null) {
                logger.debug("Invalidating session: " + session.getId());
                session.invalidate();
            }
        }

        if(clearAuthentication) {
            SecurityContext context = SecurityContextHolder.getContext();
View Full Code Here

                    "and" : "without") " migrating attributes.");
        }

        Map<String, Object> attributesToMigrate = extractAttributes(session);

        session.invalidate();
        session = request.getSession(true); // we now have a new session

        if (logger.isDebugEnabled()) {
            logger.debug("Started new session: " + session.getId());
        }
View Full Code Here

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

        hs.invalidate();

        replay();

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

    shellThread.addInputString(cmd);
    shellThread.waitUntilReady();
    if (shellThread.isDone()) {
      // the command was exit, invalidate session
      userShells.remove(session.getId());
      session.invalidate();
      return;
    }
    // get the shell's output
    StringBuilder sb = new StringBuilder();
    sb.append(shellThread.getOutput().replace("<", "&lt;").replace(">", "&gt;"));
View Full Code Here

    {
        HttpSession session =  JSFUtility.getCurrentSession();
       
        if(session != null)
        {
            session.invalidate();
        }
       
        JSFUtility.addInfoMessage("You have successfully logged out!", "");
       
        return "login";
View Full Code Here

      boolean nutzergleich = inBenutzer.getId().intValue() == ((Integer) map.get("userid")).intValue();
      if (!sessiongleich && nutzergleich) {
        HttpSession tempSession = (HttpSession) map.get("session");
        try {
          if (tempSession != null) {
            tempSession.invalidate();
          }
        } catch (RuntimeException e) {
        }
        this.alleSessions.remove(map);
      }
View Full Code Here

    this.schonEingeloggt = false;
    SessionForm temp = (SessionForm) Helper.getManagedBeanValue("#{SessionForm}");
    HttpSession mySession = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(false);
    temp.sessionBenutzerAktualisieren(mySession, this.myBenutzer);
    if (mySession != null) {
      mySession.invalidate();
    }
    return "newMain";
  }

  public String Einloggen() {
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

      else if (PropertyManager.isDevelopping())
      {
         HttpSession sess = ((HttpServletRequest)request).getSession(false);
         if (sess != null && sess.getAttribute(RootContainer.SESSION_TO_BE_INVALIDATED_ATTRIBUTE_NAME) != null)
         {
            sess.invalidate();
         }
      }
      chain.doFilter(request, response);
   }
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.