Package org.apache.catalina.core
Class ApplicationSessionCookieConfig
- java.lang.Object
- 
- org.apache.catalina.core.ApplicationSessionCookieConfig
 
- 
- All Implemented Interfaces:
- SessionCookieConfig
 
 public class ApplicationSessionCookieConfig extends java.lang.Object implements SessionCookieConfig 
- 
- 
Constructor SummaryConstructors Constructor Description ApplicationSessionCookieConfig(StandardContext context)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CookiecreateSessionCookie(Context context, java.lang.String sessionId, boolean secure)Creates a new session cookie for the given session IDjava.lang.StringgetComment()Obtain the comment to use for session cookies.java.lang.StringgetDomain()Obtain the domain to use for session cookies.intgetMaxAge()Obtain the maximum age to set for a session cookie.java.lang.StringgetName()Obtain the name to use for the session cookies.java.lang.StringgetPath()Obtain the path to use for session cookies.booleanisHttpOnly()Will session cookies be created with the httpOnly flag set?booleanisSecure()Will session cookies be created with the secure flag set?voidsetComment(java.lang.String comment)Sets the comment for the session cookievoidsetDomain(java.lang.String domain)Sets the domain for the session cookievoidsetHttpOnly(boolean httpOnly)Sets the httpOnly flag for the session cookie.voidsetMaxAge(int maxAge)Sets the maximum age.voidsetName(java.lang.String name)Sets the session cookie name.voidsetPath(java.lang.String path)Sets the path of the session cookie.voidsetSecure(boolean secure)Sets the secure flag for the session cookie.
 
- 
- 
- 
Constructor Detail- 
ApplicationSessionCookieConfigpublic ApplicationSessionCookieConfig(StandardContext context) 
 
- 
 - 
Method Detail- 
getCommentpublic java.lang.String getComment() Description copied from interface:javax.servlet.SessionCookieConfigObtain the comment to use for session cookies.- Specified by:
- getCommentin interface- SessionCookieConfig
- Returns:
- the comment to use for session cookies.
 
 - 
getDomainpublic java.lang.String getDomain() Description copied from interface:javax.servlet.SessionCookieConfigObtain the domain to use for session cookies.- Specified by:
- getDomainin interface- SessionCookieConfig
- Returns:
- the domain to use for session cookies.
 
 - 
getMaxAgepublic int getMaxAge() Description copied from interface:javax.servlet.SessionCookieConfigObtain the maximum age to set for a session cookie.- Specified by:
- getMaxAgein interface- SessionCookieConfig
- Returns:
- the maximum age in seconds
 
 - 
getNamepublic java.lang.String getName() Description copied from interface:javax.servlet.SessionCookieConfigObtain the name to use for the session cookies.- Specified by:
- getNamein interface- SessionCookieConfig
- Returns:
- the name to use for session cookies.
 
 - 
getPathpublic java.lang.String getPath() Description copied from interface:javax.servlet.SessionCookieConfigObtain the path to use for session cookies. This is normally the context path.- Specified by:
- getPathin interface- SessionCookieConfig
- Returns:
- The path to use for session cookies.
 
 - 
isHttpOnlypublic boolean isHttpOnly() Description copied from interface:javax.servlet.SessionCookieConfigWill session cookies be created with the httpOnly flag set?- Specified by:
- isHttpOnlyin interface- SessionCookieConfig
- Returns:
- trueif the flag should be set, otherwise- false
 
 - 
isSecurepublic boolean isSecure() Description copied from interface:javax.servlet.SessionCookieConfigWill session cookies be created with the secure flag set?- Specified by:
- isSecurein interface- SessionCookieConfig
- Returns:
- trueif the flag should be set, otherwise- false
 
 - 
setCommentpublic void setComment(java.lang.String comment) Description copied from interface:javax.servlet.SessionCookieConfigSets the comment for the session cookie- Specified by:
- setCommentin interface- SessionCookieConfig
- Parameters:
- comment- The session cookie comment
 
 - 
setDomainpublic void setDomain(java.lang.String domain) Description copied from interface:javax.servlet.SessionCookieConfigSets the domain for the session cookie- Specified by:
- setDomainin interface- SessionCookieConfig
- Parameters:
- domain- The session cookie domain
 
 - 
setHttpOnlypublic void setHttpOnly(boolean httpOnly) Description copied from interface:javax.servlet.SessionCookieConfigSets the httpOnly flag for the session cookie.- Specified by:
- setHttpOnlyin interface- SessionCookieConfig
- Parameters:
- httpOnly- The httpOnly setting to use for session cookies
 
 - 
setMaxAgepublic void setMaxAge(int maxAge) Description copied from interface:javax.servlet.SessionCookieConfigSets the maximum age.- Specified by:
- setMaxAgein interface- SessionCookieConfig
- Parameters:
- maxAge- the maximum age to set
 
 - 
setNamepublic void setName(java.lang.String name) Description copied from interface:javax.servlet.SessionCookieConfigSets the session cookie name.- Specified by:
- setNamein interface- SessionCookieConfig
- Parameters:
- name- The name of the session cookie
 
 - 
setPathpublic void setPath(java.lang.String path) Description copied from interface:javax.servlet.SessionCookieConfigSets the path of the session cookie.- Specified by:
- setPathin interface- SessionCookieConfig
- Parameters:
- path- The session cookie path
 
 - 
setSecurepublic void setSecure(boolean secure) Description copied from interface:javax.servlet.SessionCookieConfigSets the secure flag for the session cookie.- Specified by:
- setSecurein interface- SessionCookieConfig
- Parameters:
- secure- The secure setting to use for session cookies
 
 - 
createSessionCookiepublic static Cookie createSessionCookie(Context context, java.lang.String sessionId, boolean secure) Creates a new session cookie for the given session ID- Parameters:
- context- The Context for the web application
- sessionId- The ID of the session for which the cookie will be created
- secure- Should session cookie be configured as secure
- Returns:
- the cookie for the session
 
 
- 
 
-