/** * This will accept any cookie header and parse it such that all * cookies within it are converted to <code>Cookie</code> objects * and made available as typed objects. If the value can not be * parsed this will not add the cookie value. * * @param value this is the value of the cookie to be parsed */ protected void cookie(String value) { cookies.parse(value); for(Cookie cookie : cookies) { header.setCookie(cookie); } }
/** * This will accept any cookie header and parse it such that all * cookies within it are converted to <code>Cookie</code> objects * and made available as typed objects. If the value can not be * parsed this will not add the cookie value. * * @param value this is the value of the cookie to be parsed */ protected void cookie(String value) { cookies.parse(value); for(Cookie cookie : cookies) { header.setCookie(cookie); } }
/** * This will accept any cookie header and parse it such that all * cookies within it are converted to <code>Cookie</code> objects * and made available as typed objects. If the value can not be * parsed this will not add the cookie value. * * @param value this is the value of the cookie to be parsed */ protected void cookie(String value) { cookies.parse(value); for(Cookie cookie : cookies) { header.setCookie(cookie); } }
/** * The <code>setCookie</code> method is used to set a cookie value * with the cookie name. This will add a cookie to the response * stored under the name of the cookie, when this is committed it * will be added as a Set-Cookie header to the resulting response. * This is a convenience method that avoids cookie creation. * * @param name this is the cookie to be added to the response * @param value this is the cookie value that is to be used * * @return returns the cookie that has been set in the response */ public Cookie setCookie(String name, String value) { return setCookie(new Cookie(name, value, true)); }
/** * The <code>setCookie</code> method is used to set a cookie value * with the cookie name. This will add a cookie to the response * stored under the name of the cookie, when this is committed it * will be added as a Set-Cookie header to the resulting response. * This is a convenience method that avoids cookie creation. * * @param name this is the cookie to be added to the response * @param value this is the cookie value that is to be used * * @return returns the cookie that has been set in the response */ public Cookie setCookie(String name, String value) { return setCookie(new Cookie(name, value, true)); }
/** * The <code>setCookie</code> method is used to set a cookie value * with the cookie name. This will add a cookie to the response * stored under the name of the cookie, when this is committed it * will be added as a Set-Cookie header to the resulting response. * This is a convenience method that avoids cookie creation. * * @param name this is the cookie to be added to the response * @param value this is the cookie value that is to be used * * @return returns the cookie that has been set in the response */ public Cookie setCookie(String name, String value) { return setCookie(new Cookie(name, value, true)); }