javax.servlet.SessionCookieConfigpublic class ApplicationSessionCookieConfig
extends java.lang.Object
implements javax.servlet.SessionCookieConfig
| Constructor | Description |
|---|---|
ApplicationSessionCookieConfig(StandardContext context) |
| Modifier and Type | Method | Description |
|---|---|---|
static javax.servlet.http.Cookie |
createSessionCookie(Context context,
java.lang.String sessionId,
boolean secure) |
Creates a new session cookie for the given session ID
|
java.lang.String |
getComment() |
|
java.lang.String |
getDomain() |
|
int |
getMaxAge() |
|
java.lang.String |
getName() |
|
java.lang.String |
getPath() |
|
boolean |
isHttpOnly() |
|
boolean |
isSecure() |
|
void |
setComment(java.lang.String comment) |
Sets the comment for the session cookie
|
void |
setDomain(java.lang.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(java.lang.String name) |
Sets the session cookie name.
|
void |
setPath(java.lang.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 java.lang.String getComment()
getComment in interface javax.servlet.SessionCookieConfigpublic java.lang.String getDomain()
getDomain in interface javax.servlet.SessionCookieConfigpublic int getMaxAge()
getMaxAge in interface javax.servlet.SessionCookieConfigpublic java.lang.String getName()
getName in interface javax.servlet.SessionCookieConfigpublic java.lang.String getPath()
getPath in interface javax.servlet.SessionCookieConfigpublic boolean isHttpOnly()
isHttpOnly in interface javax.servlet.SessionCookieConfigpublic boolean isSecure()
isSecure in interface javax.servlet.SessionCookieConfigpublic void setComment(java.lang.String comment)
javax.servlet.SessionCookieConfigsetComment in interface javax.servlet.SessionCookieConfigcomment - The session cookie commentpublic void setDomain(java.lang.String domain)
javax.servlet.SessionCookieConfigsetDomain in interface javax.servlet.SessionCookieConfigdomain - The session cookie domainpublic void setHttpOnly(boolean httpOnly)
javax.servlet.SessionCookieConfigsetHttpOnly in interface javax.servlet.SessionCookieConfighttpOnly - The httpOnly setting to use for session cookiespublic void setMaxAge(int maxAge)
javax.servlet.SessionCookieConfigsetMaxAge in interface javax.servlet.SessionCookieConfigmaxAge - the maximum age to setpublic void setName(java.lang.String name)
javax.servlet.SessionCookieConfigsetName in interface javax.servlet.SessionCookieConfigname - The name of the session cookiepublic void setPath(java.lang.String path)
javax.servlet.SessionCookieConfigsetPath in interface javax.servlet.SessionCookieConfigpath - The session cookie pathpublic void setSecure(boolean secure)
javax.servlet.SessionCookieConfigsetSecure in interface javax.servlet.SessionCookieConfigsecure - The secure setting to use for session cookiespublic static javax.servlet.http.Cookie createSessionCookie(Context context, java.lang.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 secureCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.