<table style=" border: 1px solid black">
<thead><td>id</td><td>名称</td><td>价格</td></thead>
//通过域对象获取从action里面获得的集合,el表达式${} var="item"是设置变量
//item相当于一个对象,对象.属性就是获取相关的值
<c:forEach items="${applicationScope.list}" var ="item">
<tr>
<td>${item.goodid}</td>
<td>${item.goodname}</td>
<td>${item.goodprice}</td>
</tr>
<br>
</c:forEach>
</table>
最后
以上就是听话哈密瓜最近收集整理的关于jstl遍历集合的全部内容,更多相关jstl遍历集合内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复