public void saveTo(HttpServletRequest request, HttpServletResponse response) { String name = getName(); String value = getValue(); String comment = getComment(); String domain = getDomain(); String path = calculatePath(request); int maxAge = getMaxAge(); int version = getVersion(); boolean secure = isSecure(); boolean httpOnly = isHttpOnly(); addCookieHeader(response, name, value, comment, domain, path, maxAge, version, secure, httpOnly); }