Class SessionConfig
java.lang.Object
org.apache.tomcat.util.descriptor.web.SessionConfig
Representation of a session configuration element for a web application, as represented in a
<session-config> element in the deployment descriptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSessionTrackingMode(String sessionTrackingMode) Adds a session tracking mode.getCookieAttribute(String name) Returns a cookie attribute value.Returns the cookie attributes map.Returns the cookie comment.Returns the cookie domain.Returns the cookie HTTP-only flag.Returns the cookie max age.Returns the cookie name.Returns the cookie path.Returns the cookie secure flag.Returns the session timeout.Returns the session tracking modes.voidsetCookieAttribute(String name, String value) Sets a cookie attribute.voidsetCookieComment(String cookieComment) Sets the cookie comment.voidsetCookieDomain(String cookieDomain) Sets the cookie domain.voidsetCookieHttpOnly(String cookieHttpOnly) Sets the cookie HTTP-only flag.voidsetCookieMaxAge(String cookieMaxAge) Sets the cookie max age.voidsetCookieName(String cookieName) Sets the cookie name.voidsetCookiePath(String cookiePath) Sets the cookie path.voidsetCookieSecure(String cookieSecure) Sets the cookie secure flag.voidsetSessionTimeout(String sessionTimeout) Sets the session timeout.
-
Constructor Details
-
SessionConfig
public SessionConfig()Default constructor.
-
-
Method Details
-
getSessionTimeout
-
setSessionTimeout
Sets the session timeout.- Parameters:
sessionTimeout- the session timeout
-
getCookieName
-
setCookieName
Sets the cookie name.- Parameters:
cookieName- the cookie name
-
getCookieDomain
-
setCookieDomain
Sets the cookie domain.- Parameters:
cookieDomain- the cookie domain
-
getCookiePath
-
setCookiePath
Sets the cookie path.- Parameters:
cookiePath- the cookie path
-
getCookieComment
-
setCookieComment
Sets the cookie comment.- Parameters:
cookieComment- the cookie comment
-
getCookieHttpOnly
-
setCookieHttpOnly
Sets the cookie HTTP-only flag.- Parameters:
cookieHttpOnly- the HTTP-only flag
-
getCookieSecure
-
setCookieSecure
Sets the cookie secure flag.- Parameters:
cookieSecure- the secure flag
-
getCookieMaxAge
-
setCookieMaxAge
Sets the cookie max age.- Parameters:
cookieMaxAge- the max age
-
getCookieAttributes
-
setCookieAttribute
-
getCookieAttribute
-
getSessionTrackingModes
Returns the session tracking modes.- Returns:
- the session tracking modes
-
addSessionTrackingMode
Adds a session tracking mode.- Parameters:
sessionTrackingMode- the tracking mode to add
-