Package org.apache.catalina.core
Class ApplicationSessionCookieConfig
java.lang.Object
org.apache.catalina.core.ApplicationSessionCookieConfig
- All Implemented Interfaces:
- SessionCookieConfig
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic CookiecreateSessionCookie(Context context, String sessionId, boolean secure) Creates a new session cookie for the given session IDgetAttribute(String name) Obtain the value for a sesison cookie given attribute.Obtain the Map of attributes and values (excluding version) for this session cookie.With the adoption of support for RFC 6265, this method should no longer be used.Obtain the domain to use for session cookies.intObtain the maximum age to set for a session cookie.getName()Obtain the name to use for the session cookies.getPath()Obtain the path to use for session cookies.booleanWill session cookies be created with the httpOnly flag set?booleanisSecure()Will session cookies be created with the secure flag set?voidsetAttribute(String name, String value) Sets the value for the given session cookie attribute.voidsetComment(String comment) If called, this method has no effect.voidSets the domain for the session cookievoidsetHttpOnly(boolean httpOnly) Sets the httpOnly flag for the session cookie.voidsetMaxAge(int maxAge) Sets the maximum age.voidSets the session cookie name.voidSets the path of the session cookie.voidsetSecure(boolean secure) Sets the secure flag for the session cookie.
- 
Constructor Details- 
ApplicationSessionCookieConfig
 
- 
- 
Method Details- 
getCommentDescription copied from interface:jakarta.servlet.SessionCookieConfigWith the adoption of support for RFC 6265, this method should no longer be used.- Specified by:
- getCommentin interface- SessionCookieConfig
- Returns:
- always null
 
- 
getDomainDescription copied from interface:jakarta.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:jakarta.servlet.SessionCookieConfigObtain the maximum age to set for a session cookie.- Specified by:
- getMaxAgein interface- SessionCookieConfig
- Returns:
- the maximum age in seconds
 
- 
getNameDescription copied from interface:jakarta.servlet.SessionCookieConfigObtain the name to use for the session cookies.- Specified by:
- getNamein interface- SessionCookieConfig
- Returns:
- the name to use for session cookies.
 
- 
getPathDescription copied from interface:jakarta.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:jakarta.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:jakarta.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
 
- 
setCommentDescription copied from interface:jakarta.servlet.SessionCookieConfigIf called, this method has no effect.- Specified by:
- setCommentin interface- SessionCookieConfig
- Parameters:
- comment- Ignore
 
- 
setDomainDescription copied from interface:jakarta.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:jakarta.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:jakarta.servlet.SessionCookieConfigSets the maximum age.- Specified by:
- setMaxAgein interface- SessionCookieConfig
- Parameters:
- maxAge- the maximum age to set
 
- 
setNameDescription copied from interface:jakarta.servlet.SessionCookieConfigSets the session cookie name.- Specified by:
- setNamein interface- SessionCookieConfig
- Parameters:
- name- The name of the session cookie
 
- 
setPathDescription copied from interface:jakarta.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:jakarta.servlet.SessionCookieConfigSets the secure flag for the session cookie.- Specified by:
- setSecurein interface- SessionCookieConfig
- Parameters:
- secure- The secure setting to use for session cookies
 
- 
setAttributeDescription copied from interface:jakarta.servlet.SessionCookieConfigSets the value for the given session cookie attribute. When a value is set via this method, the value returned by the attribute specific getter (if any) must be consistent with the value set via this method.- Specified by:
- setAttributein interface- SessionCookieConfig
- Parameters:
- name- Name of attribute to set
- value- Value of attribute
 
- 
getAttributeDescription copied from interface:jakarta.servlet.SessionCookieConfigObtain the value for a sesison cookie given attribute. Values returned from this method must be consistent with the values set and returned by the attribute specific getters and setters in this class.- Specified by:
- getAttributein interface- SessionCookieConfig
- Parameters:
- name- Name of attribute to return
- Returns:
- Value of specified attribute
 
- 
getAttributesDescription copied from interface:jakarta.servlet.SessionCookieConfigObtain the Map of attributes and values (excluding version) for this session cookie.- Specified by:
- getAttributesin interface- SessionCookieConfig
- Returns:
- A read-only Map of attributes to values, excluding version.
 
- 
createSessionCookieCreates 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
 
 
-