Package javax.servlet.http

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


                                 HttpServletResponse response)
        throws IOException, ServletException {

        // Invalidate the current session and create a new one
        HttpSession session = request.getSession();
        session.invalidate();
        session = request.getSession(true);

        // Forward control back to the main menu
        return (mapping.findForward("Main Menu"));
View Full Code Here


        @Override
        public void service(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            HttpSession session = req.getSession();
            session.invalidate();
            session = req.getSession();
            session.invalidate();
            req.getSession();
        }
       
View Full Code Here

        public void service(HttpServletRequest req, HttpServletResponse res)
                throws ServletException, IOException {
            HttpSession session = req.getSession();
            session.invalidate();
            session = req.getSession();
            session.invalidate();
            req.getSession();
        }
       
    }
       
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

            Assert.assertNull(context.getSessionAttribute("key"));
            context.setSessionAttribute("key", "value");
            Assert.assertEquals("value", context.getSessionAttribute("key"));

            // Invalidate should clear all attributes from session instance
            session.invalidate();

            // Since we run outside a real Servlet Container, we simulate
            // a Servlet Container nullifying the session that was invalidated
            // above.
            context.getMockRequest().setSession(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

        // if this was an anonymous checkout process, go ahead and clear the session and such now that the order is placed; we don't want this to mess up additional orders and such
        HttpSession session = request.getSession();
        GenericValue userLogin = (GenericValue) session.getAttribute("userLogin");
        if (userLogin != null && "anonymous".equals(userLogin.get("userLoginId"))) {
            // here we want to do a full logout, but not using the normal logout stuff because it saves things in the UserLogin record that we don't want changed for the anonymous user
            session.invalidate();
            session = request.getSession(true);

            // to allow the display of the order confirmation page put the userLogin in the request, but leave it out of the session
            request.setAttribute("temporaryAnonymousUserLogin", userLogin);
View Full Code Here

        request.removeAttribute("dispatcher");
        request.removeAttribute("security");
        request.removeAttribute("authz");

        // now empty out the session
        session.invalidate();
        session = request.getSession(true);

        // setup some things that should always be there
        UtilHttp.setInitialRequestInfo(request);
View Full Code Here

   *
   * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
   */
  protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
    HttpSession session = req.getSession();
    session.invalidate();
      req.getSession(true);
      req.getRequestDispatcher("/").forward(req, resp);
  }

}
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

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.