2.x只需要继承SimpleTagSupport
1.x 输出流 JspWriter out = pageContext.getOut();
2.x 输出流 JspWriter out = getJspContext().getOut();
如果标签体有内容
StringWriter sw = new StringWriter();
getJspBody().invoke(sw);
getJspContext().getOut().println(sw.toString() + message);
tld的的<bodycontent>有点不一样,不能写JSP和empty
写tagdependent
时间: 2024-10-14 10:44:25