public class ApplicationSessionCookieConfig extends Object implements SessionCookieConfig
| Constructor and Description |
|---|
ApplicationSessionCookieConfig(StandardContext context) |
| Modifier and Type | Method and Description |
|---|---|
static Cookie |
createSessionCookie(Context context,
String sessionId,
boolean secure)
Creates a new session cookie for the given session ID
|
String |
getComment() |
String |
getDomain() |
int |
getMaxAge() |
String |
getName() |
String |
getPath() |
static String |
getSessionCookieName(Context context)
Deprecated.
Replaced by
SessionConfig.getSessionCookieName(Context). This
will be removed in Tomcat 8.0.x. |
static String |
getSessionUriParamName(Context context)
Deprecated.
Replaced by
SessionConfig.getSessionUriParamName(Context). This
will be removed in Tomcat 8.0.x. |
boolean |
isHttpOnly() |
boolean |
isSecure() |
void |
setComment(String comment)
Sets the comment for the session cookie
|
void |
setDomain(String domain)
Sets the domain for the session cookie
|
void |
setHttpOnly(boolean httpOnly)
Sets the httpOnly flag for the session cookie.
|
void |
setMaxAge(int maxAge)
Sets the maximum age.
|
void |
setName(String name)
Sets the session cookie name.
|
void |
setPath(String path)
Sets the path of the session cookie.
|
void |
setSecure(boolean secure)
Sets the secure flag for the session cookie.
|
public ApplicationSessionCookieConfig(StandardContext context)
public String getComment()
getComment in interface SessionCookieConfigpublic String getDomain()
getDomain in interface SessionCookieConfigpublic int getMaxAge()
getMaxAge in interface SessionCookieConfigpublic String getName()
getName in interface SessionCookieConfigpublic String getPath()
getPath in interface SessionCookieConfigpublic boolean isHttpOnly()
isHttpOnly in interface SessionCookieConfigpublic boolean isSecure()
isSecure in interface SessionCookieConfigpublic void setComment(String comment)
SessionCookieConfigsetComment in interface SessionCookieConfigcomment - The session cookie commentpublic void setDomain(String domain)
SessionCookieConfigsetDomain in interface SessionCookieConfigdomain - The session cookie domainpublic void setHttpOnly(boolean httpOnly)
SessionCookieConfigsetHttpOnly in interface SessionCookieConfighttpOnly - The httpOnly setting to use for session cookiespublic void setMaxAge(int maxAge)
SessionCookieConfigsetMaxAge in interface SessionCookieConfigmaxAge - the maximum age to setpublic void setName(String name)
SessionCookieConfigsetName in interface SessionCookieConfigname - The name of the session cookiepublic void setPath(String path)
SessionCookieConfigsetPath in interface SessionCookieConfigpath - The session cookie pathpublic void setSecure(boolean secure)
SessionCookieConfigsetSecure in interface SessionCookieConfigsecure - The secure setting to use for session cookiespublic static Cookie createSessionCookie(Context context, String sessionId, boolean secure)
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@Deprecated public static String getSessionCookieName(Context context)
SessionConfig.getSessionCookieName(Context). This
will be removed in Tomcat 8.0.x.context - The Context for the web application@Deprecated public static String getSessionUriParamName(Context context)
SessionConfig.getSessionUriParamName(Context). This
will be removed in Tomcat 8.0.x.context - The Context for the web applicationCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.