public class CookieGenerator
extends java.lang.Object
Helper class for cookie generation, carrying cookie descriptor settings
as bean properties and being able to add and remove cookie to/from a
given response.
Can serve as base class for components that generate specific cookies,
such as CookieLocaleResolver and CookieThemeResolver.
Return the path for cookies created by this generator.
setCookieMaxAge
public void setCookieMaxAge(@Nullable
java.lang.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.
@Nullable
public java.lang.Integer getCookieMaxAge()
Return the maximum age for cookies created by this generator.
setCookieSecure
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.