Package javax.servlet.http

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


    throws IOException {

        // Invalidate session, if any
        HttpSession httpSession = request.getSession(false);
        if (httpSession != null)
            httpSession.invalidate();

        // Redirect to index
        response.sendRedirect("index.xhtml");

    }
View Full Code Here


    return new ModelAndView("approved", "document", document);
  }

  public ModelAndView logout(HttpServletRequest request, HttpServletResponse response) {
    HttpSession session = request.getSession();
    session.invalidate();
    SecurityContextHolder.setContext(null);
    return new ModelAndView(new RedirectView("/index.jsp", true));
  }
}
View Full Code Here

            if (session != null) {
                if (user != null && user.getUserID().equals(name)) {
                    /*
                     * we deleted a logged-in user. so, log them out
                     */
                    session.invalidate();
                }
            }
        } catch (UserException e) {
            this.responseString = e.getMessage();
        }
View Full Code Here

                session.setAttribute("value", value + 1);
            }
            else if ("invalidate".equals(action))
            {
                HttpSession session = request.getSession(false);
                session.invalidate();
            }
            else if ("test".equals(action))
            {
                HttpSession session = request.getSession(false);
                assert session == null;
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

        }

        // Process user logoff by removing session attributes
        session.removeAttribute(Constants.SUBSCRIPTION_KEY);
        session.removeAttribute(Constants.USER_KEY);
        session.invalidate();

        // Done
        return doFindSuccess(mapping);

    }
View Full Code Here

    }
   
    public String process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        HttpSession session=request.getSession(false);
        if(session != null) {
            session.invalidate();
        }
       
        // don't like showing login in url because can't bookmark so redirect to it
        response.sendRedirect(request.getContextPath() + "/event/list");
        return null;
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

                          session.getId());
            }
    }
    session.removeAttribute(Constants.SUBSCRIPTION_KEY);
    session.removeAttribute(Constants.USER_KEY);
    session.invalidate();

    // Forward control to the specified success URI
    return (mapping.findForward("success"));

    }
View Full Code Here

        response.addCookie( idCookie );
        response.addCookie( emailCookie );
        response.addCookie( passwordCookie );

        /* Invalidate session contents */
        session.invalidate();
    }
}
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.