The example given in the doc does not work. The path is never set in the cookie <res:addCookie name="test"> <res:value>Yes</res:value> <res:path>/response-examples/</res:path> </res:addCookie> The cause is to be found in the AddCookieTag.java. Have a llok at the doEndTag() method, you'll find a missing line! public final int doEndTag() throws JspException { // Set the cookie attribute values if( value != null ) cookie.setValue(value); if( comment != null ) cookie.setComment(comment); if( domain != null ) cookie.setDomain(domain); ---> cookie.setPath(path); cookie.setMaxAge(maxAge); cookie.setSecure(secure); cookie.setVersion(version); // Add the cookie ((HttpServletResponse)pageContext.getResponse()).addCookie(cookie); return EVAL_PAGE; } Could you please correct this? Thank you! Cheers Christophe
Created attachment 9459 [details] Patch to resolve this issue.
I've applied the patch since one was available and verified. However, the response taglib has been deprecated, we do not expect any development around it in the near future. Please switch to the using JSTL, if possible.