List of usage examples for javax.servlet.http HttpSession getId
public String getId();
From source file:nl.b3p.kaartenbalie.struts.LogoutAction.java
@Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession session = request.getSession(); String sessionId = session.getId(); session.invalidate();//from w w w . j a va 2 s. co m log.debug("Logged out from session: " + sessionId); return mapping.findForward("success"); }
From source file:com.liferay.portal.events.SessionCreateAction.java
public void run(HttpSession ses) throws ActionException { try {/*from w ww. j a v a 2s . c om*/ _log.debug(ses.getId()); } catch (Exception e) { throw new ActionException(e); } }
From source file:de.berlios.gpon.wui.session.InitSessionListener.java
public void sessionCreated(HttpSessionEvent event) { HttpSession session = event.getSession(); log.debug("Got session: " + session.getId()); SessionUtility su = new SessionUtility(session); // Dunno what to do, but su does su.init();/*from w w w .ja v a 2 s. c o m*/ }
From source file:org.soundstage.web.controller.LoginUserController.java
@RequestMapping({ "/FrontApp.view", "/Home.view" }) public String frontApp(HttpServletRequest request, Model model) { HttpSession session = request.getSession(true); System.out.println(session.getId()); return "header"; }
From source file:net.firejack.platform.utils.SessionManager.java
/** * @param httpSession */ public void addSession(HttpSession httpSession) { sessionsMap.putIfAbsent(httpSession.getId(), httpSession); }
From source file:be.e_contract.eid.android.demo.webapp.IdentificationController.java
public String getUrl() { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); String host = externalContext.getRequestServerName(); String contextPath = externalContext.getRequestContextPath(); HttpSession httpSession = (HttpSession) externalContext.getSession(true); String sessionId = httpSession.getId(); String url = "beid:http://" + host + contextPath + "/identification?jsessionid=" + sessionId; LOG.debug("URL: " + url); return url;//from w w w . j a v a 2 s.c o m }
From source file:org.alliance.rebel.tomcat.web.SampleController.java
@RequestMapping(value = "/setSession/{key}/{value}") @ResponseBody/*from w ww . j a va2 s. c om*/ public String setSession(@PathVariable("key") String key, @PathVariable("value") String value, HttpSession session) { session.setAttribute(key, value); return session.getId(); }
From source file:nl.b3p.web.SharedSessionData.java
public void sessionCreated(HttpSessionEvent event) { HttpSession session = event.getSession(); log.debug("adding a map for session: " + session.getId()); sessions.put(session.getId(), new ConcurrentHashMap<String, String>(8)); }
From source file:org.apache.cxf.fediz.service.idp.beans.LogoutAction.java
public void submit(RequestContext requestContext) { SecurityContextHolder.clearContext(); LOG.info("Security context has been cleared."); HttpSession session = WebUtils.getHttpSession(requestContext); session.invalidate();/*from w ww . j a v a 2 s .c om*/ LOG.info("Session " + session.getId() + " has been invalidated."); }
From source file:net.firejack.platform.utils.SessionManager.java
/** * @param user// ww w . ja v a 2 s . c om * @param httpSession */ public void addUserToSession(IUserInfoProvider user, HttpSession httpSession) { HttpSession session = sessionsMap.get(httpSession.getId()); if (session == null) { session = httpSession; sessionsMap.putIfAbsent(httpSession.getId(), session); } session.setAttribute(SESSION_USER_INFO_PARAM, user); }