Package javax.servlet
Interface SessionCookieConfig
- 
 public interface SessionCookieConfigConfigures the session cookies used by the web application associated with the ServletContext from which this SessionCookieConfig was obtained.- Since:
- Servlet 3.0
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetComment()Obtain the comment to use for session cookies.java.lang.StringgetDomain()Obtain the domain to use for session cookies.intgetMaxAge()Obtain the maximum age to set for a session cookie.java.lang.StringgetName()Obtain the name to use for the session cookies.java.lang.StringgetPath()Obtain the path to use for session cookies.booleanisHttpOnly()Will session cookies be created with the httpOnly flag set?booleanisSecure()Will session cookies be created with the secure flag set?voidsetComment(java.lang.String comment)Sets the comment for the session cookievoidsetDomain(java.lang.String domain)Sets the domain for the session cookievoidsetHttpOnly(boolean httpOnly)Sets the httpOnly flag for the session cookie.voidsetMaxAge(int MaxAge)Sets the maximum age.voidsetName(java.lang.String name)Sets the session cookie name.voidsetPath(java.lang.String path)Sets the path of the session cookie.voidsetSecure(boolean secure)Sets the secure flag for the session cookie.
 
- 
- 
- 
Method Detail- 
setNamevoid setName(java.lang.String name) Sets the session cookie name.- Parameters:
- name- The name of the session cookie
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
getNamejava.lang.String getName() Obtain the name to use for the session cookies.- Returns:
- the name to use for session cookies.
 
 - 
setDomainvoid setDomain(java.lang.String domain) Sets the domain for the session cookie- Parameters:
- domain- The session cookie domain
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
getDomainjava.lang.String getDomain() Obtain the domain to use for session cookies.- Returns:
- the domain to use for session cookies.
 
 - 
setPathvoid setPath(java.lang.String path) Sets the path of the session cookie.- Parameters:
- path- The session cookie path
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
getPathjava.lang.String getPath() Obtain the path to use for session cookies. This is normally the context path.- Returns:
- The path to use for session cookies.
 
 - 
setCommentvoid setComment(java.lang.String comment) Sets the comment for the session cookie- Parameters:
- comment- The session cookie comment
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
getCommentjava.lang.String getComment() Obtain the comment to use for session cookies.- Returns:
- the comment to use for session cookies.
 
 - 
setHttpOnlyvoid setHttpOnly(boolean httpOnly) Sets the httpOnly flag for the session cookie.- Parameters:
- httpOnly- The httpOnly setting to use for session cookies
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
isHttpOnlyboolean isHttpOnly() Will session cookies be created with the httpOnly flag set?- Returns:
- trueif the flag should be set, otherwise- false
 
 - 
setSecurevoid setSecure(boolean secure) Sets the secure flag for the session cookie.- Parameters:
- secure- The secure setting to use for session cookies
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
isSecureboolean isSecure() Will session cookies be created with the secure flag set?- Returns:
- trueif the flag should be set, otherwise- false
 
 - 
setMaxAgevoid setMaxAge(int MaxAge) Sets the maximum age.- Parameters:
- MaxAge- the maximum age to set
- Throws:
- java.lang.IllegalStateException- if the associated ServletContext has already been initialised
 
 - 
getMaxAgeint getMaxAge() Obtain the maximum age to set for a session cookie.- Returns:
- the maximum age in seconds
 
 
- 
 
-