Action
全局变量
private ActivityNotification activity;
@Resource
private IActivityNotificationService activityService;
...
方法体
...
servletRequest.setAttribute("list", list);
jsp页面
1.引入标签
<%@ taglib prefix="s" uri="/struts-tags" %>
2.查询数据
<!-- 查询数据 -->
<s:iterator value="#request.list" var="activity">
<tr>
<td>
<div class="checkbox" id="checkboxId">
<input type="checkbox" class="checks" value="'<s:property value="#activity.activeId"/>'" />
<i></i>
</div>
</td>
<td>
<s:property value="#activity.activeId" />
</td>
<!--注意#要添加-->
</tr>
</s:iterator>
注:var="实体类实例化对象" value="action中setAttribute的list列表"