Creates a new instance of the Cookie class using the specified name, value, path, age,
and the secure setting.
Signature
public Cookie(String name, String value, String path, Integer
maxAge, Boolean isSecure)
Parameters
- name
- Type: String
- The cookie name. It can’t be null.
- value
- Type: String
- The cookie data, such as session ID.
- path
- Type: String
- The path from where you can retrieve the cookie.
- maxAge
- Type: Integer
- A number representing how long a cookie is valid for in seconds.
If set to less than zero, a session cookie is issued. If set to zero,
the cookie is deleted.
- isSecure
- Type: Boolean
- A value indicating whether the cookie can only be accessed through
HTTPS (true) or not (false).