Creates a cookie and adds it to the response
int maxAge = -1;
if (maxAgeString != null) {
try {
maxAge = Integer.valueOf(maxAgeString).intValue();
}
catch (NumberFormatException e) {
throw new JspTagException("Invalid maxAge", e);
}
}
PageContext pageContext = (PageContext) getJspContext();
HttpServletResponse response =
(HttpServletResponse) pageContext.getResponse();
CookieUtils.sendCookie(name, value, maxAge, response);