<s:form action="" theme="simple" name="right">
<table border="1" width="50%">
<tr>
<td colspan="2" align="center">基础信息</td>
</tr>
<s:iterator value="userList" id="user">
<tr>
<td><s:property value="#user.merName"/></td>
<td><s:property value="#user.merPay"/></td>
</tr>
</s:iterator>
</table>
</s:form>
ps:
userList是Action中的集合,user是集合中对象的别名
其实就类似于java里的foreach循环
for(User user:UserList){
sysout(user.getMerName());//简写输出语句
}
此网页形式展示了用户的基本信息,包括名字和支付方式,通过迭代集合来呈现每个用户的详细数据。
985

被折叠的 条评论
为什么被折叠?



