@Override public void doTag() throws JspException, IOException { Collection itemList = (Collection) getJspContext().getAttribute(collection); for (Object o : itemList) { // 将集合中的元素设置到页面 getJspContext().setAttribute(item, o); // 输出标签体 getJspBody().invoke(null); } super.doTag(); }