<body>
<s:action name="userList" executeResult="true"></s:action> <table border="1" cellpadding="0" cellspacing="0">
<s:iterator value="#request.ulist">
<tr>
<td width="100"><s:property value="%{id}"/></td>
<td width="200"><s:property value="%{name}"/></td>
<td width="200"><s:property value="%{pass}"/></td>
</tr>
</s:iterator>
</table>
<br/>
</body>页面代码
public String select() {
try {
List<Userss> userList = biz.userList();
this.setUlist(userList);
return SUCCESS;
} catch (Exception e) {
e.printStackTrace();
return INPUT;
}
}action代码
<action name="userList" class="userAction" method="select">
<result name="success">/index.jsp</result>
</action>action配置
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>web.xml文件
在index.jsp页面中直接请求action 在本页处理返回的数据。 打印时出现了循环的情况,循环了N次。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货