public class ApplicationSessionCookieConfig extends java.lang.Object implements SessionCookieConfig
Constructor and Description |
---|
ApplicationSessionCookieConfig(StandardContext context) |
Modifier and Type | Method and Description |
---|---|
static 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 SessionCookieConfig
public java.lang.String getDomain()
getDomain
in interface SessionCookieConfig
public int getMaxAge()
getMaxAge
in interface SessionCookieConfig
public java.lang.String getName()
getName
in interface SessionCookieConfig
public java.lang.String getPath()
getPath
in interface SessionCookieConfig
public boolean isHttpOnly()
isHttpOnly
in interface SessionCookieConfig
public boolean isSecure()
isSecure
in interface SessionCookieConfig
public void setComment(java.lang.String comment)
javax.servlet.SessionCookieConfig
setComment
in interface SessionCookieConfig
comment
- The session cookie commentpublic void setDomain(java.lang.String domain)
javax.servlet.SessionCookieConfig
setDomain
in interface SessionCookieConfig
domain
- The session cookie domainpublic void setHttpOnly(boolean httpOnly)
javax.servlet.SessionCookieConfig
setHttpOnly
in interface SessionCookieConfig
httpOnly
- The httpOnly setting to use for session cookiespublic void setMaxAge(int maxAge)
javax.servlet.SessionCookieConfig
setMaxAge
in interface SessionCookieConfig
maxAge
- the maximum age to setpublic void setName(java.lang.String name)
javax.servlet.SessionCookieConfig
setName
in interface SessionCookieConfig
name
- The name of the session cookiepublic void setPath(java.lang.String path)
javax.servlet.SessionCookieConfig
setPath
in interface SessionCookieConfig
path
- The session cookie pathpublic void setSecure(boolean secure)
javax.servlet.SessionCookieConfig
setSecure
in interface SessionCookieConfig
secure
- The secure setting to use for session cookiespublic static 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-2018 Apache Software Foundation. All Rights Reserved.