Deprecated
as of 6.0 in favor of org.
Can serve as base class for components that generate specific cookies.
addCookie, removeCookie
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private boolean | |
| private Integer | |
| private String | |
| private String | |
| private boolean | |
| public static final String | DEFAULT_COOKIE_PATH
Default path that cookies will be visible to: "/", i.e. the entire server. |
| protected final Log |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCookie(HttpServletResponse
the HTTP response to add the cookie to response, String the value of the cookie to add cookieValue)Add a cookie with the given value to the response, using the cookie descriptor settings of this generator. |
| protected Cookie | Returns: the cookiethe value of the cookie to crate cookieValue)Create a cookie with the given value, using the cookie descriptor settings of this generator (except for "cookieMaxAge"). |
| public String | |
| public Integer | |
| public String | |
| public String | |
| public boolean | |
| public boolean | isCookieSecure()
Return whether the cookie should only be sent using a secure protocol, such as HTTPS (SSL). |
| public void | removeCookie(HttpServletResponse
the HTTP response to remove the cookie from response)Remove the cookie that this generator describes from the response. |
| public void | |
| public void | setCookieHttpOnly(boolean cookieHttpOnly)
Set whether the cookie is supposed to be marked with the "HttpOnly" attribute. |
| public void | setCookieMaxAge(Integer cookieMaxAge)
Use the given maximum age (in seconds) for cookies created by this generator. |
| public void | |
| public void | |
| public void | setCookieSecure(boolean cookieSecure)
Set whether the cookie should only be sent using a secure protocol, such as HTTPS (SSL). |
| cookieDomain | back to summary |
|---|---|
| private String cookieDomain
| |
| cookieHttpOnly | back to summary |
|---|---|
| private boolean cookieHttpOnly | |
| cookieMaxAge | back to summary |
|---|---|
| private Integer cookieMaxAge
| |
| cookieName | back to summary |
|---|---|
| private String cookieName
| |
| cookiePath | back to summary |
|---|---|
| private String cookiePath | |
| cookieSecure | back to summary |
|---|---|
| private boolean cookieSecure | |
| DEFAULT_COOKIE_PATH | back to summary |
|---|---|
| public static final String DEFAULT_COOKIE_PATH Default path that cookies will be visible to: "/", i.e. the entire server. | |
| logger | back to summary |
|---|---|
| protected final Log logger | |
| CookieGenerator | back to summary |
|---|---|
| public CookieGenerator() | |
| addCookie | back to summary |
|---|---|
| public void addCookie(HttpServletResponse response, String cookieValue) Add a cookie with the given value to the response, using the cookie descriptor settings of this generator. Delegates to
| |
| createCookie | back to summary |
|---|---|
| protected Cookie createCookie(String cookieValue) Create a cookie with the given value, using the cookie descriptor settings of this generator (except for "cookieMaxAge").
| |
| getCookieDomain | back to summary |
|---|---|
| public String getCookieDomain() Return the domain for cookies created by this generator, if any.
| |
| getCookieMaxAge | back to summary |
|---|---|
| public Integer getCookieMaxAge() Return the maximum age for cookies created by this generator.
| |
| getCookieName | back to summary |
|---|---|
| public String getCookieName() Return the given name for cookies created by this generator.
| |
| getCookiePath | back to summary |
|---|---|
| public String getCookiePath() Return the path for cookies created by this generator. | |
| isCookieHttpOnly | back to summary |
|---|---|
| public boolean isCookieHttpOnly() Return whether the cookie is supposed to be marked with the "HttpOnly" attribute. | |
| isCookieSecure | back to summary |
|---|---|
| public boolean isCookieSecure() Return whether the cookie should only be sent using a secure protocol, such as HTTPS (SSL). | |
| removeCookie | back to summary |
|---|---|
| public void removeCookie(HttpServletResponse response) Remove the cookie that this generator describes from the response. Will generate a cookie with empty value and max age 0. Delegates to
| |
| setCookieDomain | back to summary |
|---|---|
| public void setCookieDomain(String cookieDomain) Use the given domain for cookies created by this generator. The cookie is only visible to servers in this domain. | |
| setCookieHttpOnly | back to summary |
|---|---|
| public void setCookieHttpOnly(boolean cookieHttpOnly) Set whether the cookie is supposed to be marked with the "HttpOnly" attribute. Default is "false". | |
| setCookieMaxAge | back to summary |
|---|---|
| public void setCookieMaxAge(Integer cookieMaxAge) Use the given maximum age (in seconds) for cookies created by this generator. Useful special value: -1 ... not persistent, deleted when client shuts down. Default is no specific maximum age at all, using the Servlet container's default. | |
| setCookieName | back to summary |
|---|---|
| public void setCookieName(String cookieName) Use the given name for cookies created by this generator. | |
| setCookiePath | back to summary |
|---|---|
| public void setCookiePath(String cookiePath) Use the given path for cookies created by this generator. The cookie is only visible to URLs in this path and below.
| |
| setCookieSecure | back to summary |
|---|---|
| public void setCookieSecure(boolean cookieSecure) Set whether the cookie should only be sent using a secure protocol, such as HTTPS (SSL). This is an indication to the receiving browser, not processed by the HTTP server itself. Default is "false". | |