List of usage examples for javax.servlet.http Cookie setComment
public void setComment(String purpose)
From source file:wicket.markup.html.form.persistence.CookieValuePersister.java
/** * Persist/save the data using Cookies.// w ww. j av a 2 s.co m * * @param cookie * The Cookie to be persisted. * @return The cookie provided */ private Cookie save(final Cookie cookie) { if (cookie == null) { return null; } final String comment = getSettings().getComment(); if (comment != null) { cookie.setComment(comment); } final String domain = getSettings().getDomain(); if (domain != null) { cookie.setDomain(domain); } cookie.setPath(getWebRequest().getContextPath()); cookie.setVersion(getSettings().getVersion()); cookie.setSecure(getSettings().getSecure()); getWebResponse().addCookie(cookie); if (log.isDebugEnabled()) { log.debug("saved: " + cookieToDebugString(new CookieWrapper(cookie))); } return cookie; }