日期:2014-05-18  浏览次数:20627 次

我用ArrayList把数据库写入其中,我该如何在struts2中使用标签输出呢?
我用ArrayList把数据库写入其中,我该如何在struts2中使用标签输出呢?

Collection<get_line> ret=new ArrayList<get_line>();
……
ret.add(db); 
……
request.setAttribute("line_hot",ret);

我该如何在struts2中使用标签循环输出呢?

在struts1中我知道标签循环输出,但struts2如何用呢

------解决方案--------------------
http://hi.baidu.com/joe95/blog/item/8e70c7a27a2e83a9caefd0c2.html

楼主 参考一下吧

------解决方案--------------------
<logic:iterate id="line" name="line_hot" type="">
<bean:write name="line" property=""/>
</logic:iterate>