Package javax.servlet.http

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


    public void doPost(HttpServletRequest pReq, HttpServletResponse pResp) throws ServletException {

        if ("logout".equals(pReq.getParameter("logout")) || "logoutHIDDEN".equals(pReq.getParameter("logoutHIDDEN"))) {
            HttpSession sess = pReq.getSession();
            if (sess != null)
                sess.invalidate();
            try {
                pResp.sendRedirect("login.html");
            } catch (IOException e) {

                e.printStackTrace();
View Full Code Here


        HttpSession session = req.getSession(false);
        if (session == null)
        {
            throw new IllegalStateException("No existing session");
        }
        session.invalidate();
    }

}
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

  {
    HttpSession httpSession = getHttpSession(request, false);
    if (httpSession != null)
    {
      // tell the app server the session is no longer valid
      httpSession.invalidate();
    }
  }

  /**
   * @see org.apache.wicket.session.ISessionStore#lookup(org.apache.wicket.request.Request)
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 (path.contains("/api/logout")) {
        // Logs out the user
        HttpSession cur = request.getSession(false);
        if (cur != null) {
          cur.invalidate();
//          request.logout();
        }
        res.put("result", "loggedout");

      } else if (path.contains("/api/messageofday/")) {
View Full Code Here

      }
     
      HttpSession session = httpServletRequest.getSession(false);
      if (session != null)
      {
         session.invalidate();
      }
   }

   // cleanUp should only be done if Cactus is running a CALL_TEST_SERVICE command
   private boolean isCallTestService(HttpServletRequest httpServletRequest)
View Full Code Here

        }

        // Invalidate the current session, set flag to avoid call to
        // valueUnbound
        reinitializingSession = true;
        oldSession.invalidate();
        reinitializingSession = false;

        // Create a new session
        HttpSession newSession = ((HttpServletRequest) currentRequest)
                .getSession();
View Full Code Here

                    if (hazelcastSessionId != null) {
                        hazelcastSession = mapSessions.get(hazelcastSessionId);
                    }
                    if (hazelcastSession == null) {
                        mapOriginalSessions.remove(originalSession.getId());
                        originalSession.invalidate();
                    }
                }
            }
            if (hazelcastSession != null) {
                return hazelcastSession;
View Full Code Here

        SecurityContext sc = exchange.getSecurityContext();
        sc.logout();
        if(servletContext.getDeployment().getDeploymentInfo().isInvalidateSessionOnLogout()) {
            HttpSession session = getSession(false);
            if(session != null) {
                session.invalidate();
            }
        }
    }

    @Override
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.