code: @Nonnull
    public static Cookie createCookie (@Nonnull final String sName,
                                       @Nullable final String sValue,
                                       final String sPath,
                                       final boolean bExpireWhenBrowserIsClosed)
    {
      final Cookie aCookie = new Cookie (sName, sValue);
      aCookie.setPath (sPath);
      if (bExpireWhenBrowserIsClosed)
        aCookie.setMaxAge (-1);
      else
        aCookie.setMaxAge (DEFAULT_MAX_AGE_SECONDS);
      return aCookie;
    }
docs: Create a cookie that is bound on a certain path within the local web
  server.
  
  @param sName
  The cookie name.
  @param sValue
  The cookie value.
  @param sPath
  The path the cookie is valid for.
  @param bExpireWhenBrowserIsClosed
  <code>true</code> if this is a browser session cookie
  @return The created cookie object.