List of usage examples for javax.servlet.http Cookie setVersion
public void setVersion(int v)
From source file:wicket.markup.html.form.persistence.CookieValuePersister.java
/** * Persist/save the data using Cookies.//from ww w . jav 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; }