@Override public SessionCookieConfig getSessionCookieConfig() { // TODO other started conditions if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
@Override public SessionCookieConfig getSessionCookieConfig() { if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
@Override public SessionCookieConfig getSessionCookieConfig() { if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
@Override public SessionCookieConfig getSessionCookieConfig() { if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
@Override public SessionCookieConfig getSessionCookieConfig() { // TODO other started conditions if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
@Override public SessionCookieConfig getSessionCookieConfig() { // TODO other started conditions if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
@Override public SessionCookieConfig getSessionCookieConfig() { if (!_enabled) throw new UnsupportedOperationException(); if (_sessionHandler!=null) return _sessionHandler.getSessionManager().getSessionCookieConfig(); return null; }
SessionManager sessionManager = new HashSessionManager(); sessionManager.setMaxInactiveInterval(60 * 15); //session time out of 15 minutes HashSessionIdManager idManager = new HashSessionIdManager(); sessionManager.getSessionCookieConfig().setName("JSESSIONID_" + Integer.toString(m_serverSettings.getM_webServerPort())); sessionManager.setSessionIdManager(idManager); SessionHandler sessionHandler = new SessionHandler(sessionManager);
// To be passed to all scanned webapps. Ensures SSO between contexts SessionManager sessManager = new HashSessionManager(); SessionCookieConfig config = sessManager.getSessionCookieConfig(); config.setPath("/webapps/"); // Ensures all webapps share the same cookie // Create the Handler (a.k.a the WebAppContext). App app = new App(deployer, provider, module.getFile().getAbsolutePath()); WebAppContext handler = (WebAppContext)app.getContextHandler(); // getContextHandler does the extraction // Consolidating all scanned webapps under a single context path allows SSO handler.setContextPath("/webapps" + handler.getContextPath()); // Cookies need to be shared between webapps for SSO SessionHandler sessHandler = handler.getSessionHandler(); sessHandler.setSessionManager(sessManager);
handler.getSessionHandler().getSessionManager().getSessionCookieConfig().setHttpOnly(true);
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
if (cookies != null && cookies.length > 0) final String sessionCookie=sessionManager.getSessionCookieConfig().getName(); for (int i = 0; i < cookies.length; i++)
sessionManager.setMaxInactiveInterval(config.getInt(ExecConstants.HTTP_SESSION_MAX_IDLE_SECS)); sessionManager.getSessionCookieConfig().setHttpOnly(true); sessionManager.addEventListener(new HttpSessionListener() { @Override