Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
5.3.2
-
None
-
None
Description
Cookie service should allow to set path, domain AND maxAge with one method. Currently there is one method for setting the path, another for cookies with maxAge but none for cookies with maxAge+path.
There should be a method like this:
void writeDomainCookieValue(String name, String value, String path, String domain, int maxAge)
{ Cookie cookie = new Cookie(name, value); if (path==null) cookie.setPath(request.getContextPath() + "/"); else cookie.setPath(path); if (domain!=null) cookie.setDomain(domain); if (maxAge!=0) cookie.setMaxAge(maxAge); else cookie.setMaxAge(defaultMaxAge); cookie.setSecure(request.isSecure()); cookieSink.addCookie(cookie); }Each other method should call this one.
Attachments
Issue Links
- duplicates
-
TAP5-1394 Adding method to Cookies api that lets you set path, domain, and maxAge at once.
- Resolved