List of usage examples for javax.servlet SessionCookieConfig getName
public String getName();
From source file:org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration.java
private CookieSerializer createDefaultCookieSerializer() { DefaultCookieSerializer cookieSerializer = new DefaultCookieSerializer(); if (this.servletContext != null) { SessionCookieConfig sessionCookieConfig = null; try {// w w w . j a v a 2 s . com sessionCookieConfig = this.servletContext.getSessionCookieConfig(); } catch (UnsupportedOperationException ex) { this.logger.warn("Unable to obtain SessionCookieConfig: " + ex.getMessage()); } if (sessionCookieConfig != null) { if (sessionCookieConfig.getName() != null) { cookieSerializer.setCookieName(sessionCookieConfig.getName()); } if (sessionCookieConfig.getDomain() != null) { cookieSerializer.setDomainName(sessionCookieConfig.getDomain()); } if (sessionCookieConfig.getPath() != null) { cookieSerializer.setCookiePath(sessionCookieConfig.getPath()); } if (sessionCookieConfig.getMaxAge() != -1) { cookieSerializer.setCookieMaxAge(sessionCookieConfig.getMaxAge()); } } } if (this.usesSpringSessionRememberMeServices) { cookieSerializer.setRememberMeRequestAttribute(SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR); } return cookieSerializer; }