struts标签<s:iterator>怎么用

[复制链接]
查看11 | 回复3 | 2017-11-23 14:57:10 | 显示全部楼层 |阅读模式
给你讲个例子吧,挺好明白的这个例子的目的是:把action中的List对象,在页面用把List的内容循环显示出来首先有一个User对象public class User {
private Integer userId;
private String userName;
private String userPwd;
//get和set方法
...........}action中的代码List list = new ArrayList();User user1 = new User();user1.set
回复

使用道具 举报

千问 | 2017-11-23 14:57:10 | 显示全部楼层

比如list里放的是account的集合,account有name的属性则

回复

使用道具 举报

千问 | 2017-11-23 14:57:10 | 显示全部楼层
action中代码 List list=业务层(XXXService).业务层方法(); request.setAttribute("l",list);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行