我尝试在自定义taglib中设置Cookie,但我从未看到Cookie到达浏览器。这是自定义标签的限制吗?
@Override
public int doStartTag() throws JspException {
ServletResponse res = pageContext.getResponse();
Cookie cookie = new Cookie("asb", "12345");
cookie.setDomain(".domain.com");
((HttpServletResponse) res).addCookie(cookie);
return SKIP_BODY;
}