List of usage examples for javax.servlet.http HttpSession getSessionContext
@Deprecated
public HttpSessionContext getSessionContext();
From source file:com.hangum.tadpole.session.manager.SessionManager.java
/** * ? session? invalidate.//w ww. ja v a 2s. c om */ public static void invalidate() { try { HttpSession sStore = RWT.getRequest().getSession(); HttpSessionContext hsc = sStore.getSessionContext(); Enumeration ids = hsc.getIds(); while (ids.hasMoreElements()) { String id = (String) ids.nextElement(); if (logger.isDebugEnabled()) logger.debug("==========================> " + hsc.getSession(id)); } } catch (Exception e) { logger.error("user session invalidate", e); } }
From source file:org.codehaus.wadi.web.TestHttpSession.java
public void testRest(Manager manager) { long start = System.currentTimeMillis(); HttpSession session = ((WADIHttpSession) manager.create(null)).getWrapper(); long end = System.currentTimeMillis(); assertTrue(session.getSessionContext().getSession(null) == null); assertTrue(session.getSessionContext().getIds() != null); session.getServletContext(); // cannot really test unless inside a container... - TODO assertTrue(session.getCreationTime() >= start && session.getCreationTime() <= end); assertTrue(session.getCreationTime() == session.getLastAccessedTime()); }