Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1858

Cookie service should allow to set path, domain AND maxAge

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 5.3.2
    • None
    • tapestry-core
    • 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

          Activity

            People

              Unassigned Unassigned
              michael@wyraz.de Michael Wyraz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: