Package org.apache.catalina.core
Class ApplicationSessionCookieConfig
java.lang.Object
org.apache.catalina.core.ApplicationSessionCookieConfig
- All Implemented Interfaces:
SessionCookieConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CookiecreateSessionCookie(Context context, String sessionId, boolean secure) Creates a new session cookie for the given session IDintgetName()getPath()booleanbooleanisSecure()voidsetComment(String comment) Sets the comment for the session cookievoidSets 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
-
getComment
- Specified by:
getCommentin interfaceSessionCookieConfig
-
getDomain
- Specified by:
getDomainin interfaceSessionCookieConfig
-
getMaxAge
public int getMaxAge()- Specified by:
getMaxAgein interfaceSessionCookieConfig
-
getName
- Specified by:
getNamein interfaceSessionCookieConfig
-
getPath
- Specified by:
getPathin interfaceSessionCookieConfig
-
isHttpOnly
public boolean isHttpOnly()- Specified by:
isHttpOnlyin interfaceSessionCookieConfig
-
isSecure
public boolean isSecure()- Specified by:
isSecurein interfaceSessionCookieConfig
-
setComment
Description copied from interface:javax.servlet.SessionCookieConfigSets the comment for the session cookie- Specified by:
setCommentin interfaceSessionCookieConfig- Parameters:
comment- The session cookie comment
-
setDomain
Description copied from interface:javax.servlet.SessionCookieConfigSets the domain for the session cookie- Specified by:
setDomainin interfaceSessionCookieConfig- Parameters:
domain- The session cookie domain
-
setHttpOnly
public void setHttpOnly(boolean httpOnly) Description copied from interface:javax.servlet.SessionCookieConfigSets the httpOnly flag for the session cookie.- Specified by:
setHttpOnlyin interfaceSessionCookieConfig- Parameters:
httpOnly- The httpOnly setting to use for session cookies
-
setMaxAge
public void setMaxAge(int maxAge) Description copied from interface:javax.servlet.SessionCookieConfigSets the maximum age.- Specified by:
setMaxAgein interfaceSessionCookieConfig- Parameters:
maxAge- the maximum age to set
-
setName
Description copied from interface:javax.servlet.SessionCookieConfigSets the session cookie name.- Specified by:
setNamein interfaceSessionCookieConfig- Parameters:
name- The name of the session cookie
-
setPath
Description copied from interface:javax.servlet.SessionCookieConfigSets the path of the session cookie.- Specified by:
setPathin interfaceSessionCookieConfig- Parameters:
path- The session cookie path
-
setSecure
public void setSecure(boolean secure) Description copied from interface:javax.servlet.SessionCookieConfigSets the secure flag for the session cookie.- Specified by:
setSecurein interfaceSessionCookieConfig- Parameters:
secure- The secure setting to use for session cookies
-
createSessionCookie
Creates a new session cookie for the given session ID- Parameters:
context- The Context for the web applicationsessionId- The ID of the session for which the cookie will be createdsecure- Should session cookie be configured as secure- Returns:
- the cookie for the session
-