Adds a cookie to the response object.
The age parameter specifies the lifetime of the cookie in seconds.
A negative value denotes a session cookie i.e. not persisted on the client.
A value of 0 deletes the cookie.
NB The new cookie's value will not be available to getCookieValue() until the next request.
returns javax.servlet.http.Cookie
Parameters
java.lang.String
cookieName,
java.lang.String
cookieValue,
int
age,
age
parameter specifies the lifetime of the cookie in seconds. A negative value denotes a session cookie i.e. not persisted on the client. A value of 0 deletes the cookie. NB The new cookie's value will not be available to getCookieValue() until the next request.