用struts的标签 <s:iterator> 标签在页面上遍历,记得 必须先引入标签库
解决方案 »
- jsp程序现在用JDBC连接SQL SERVER2005,JSP文件不变,数据库换成2008可以正常连接吗?
- jsp页面用三维场景.vrpie文件下载错误怎么解决
- 血本,100分!!上传文件时如何判断文件是否存在?在线恭候!回一个吧!!
- 用jspsmart组件下载问题
- 假设只能通过VC编程,并给出串口、网口、USB口,声卡Mic口等端口及连接电缆,简述如何实现在两台计算机之间传送一个数据文件。
- 结果集的判定????
- jsp的配置及一个简单实例,在线等待!!!!!!!!!!!!!!!
- 救命呀
- 急!!加密问题?
- 什么叫UML?
- MultipartFile上传文件如何支持断点续传?
- MAVEN 编译时无法找到rt.jar
<logic:present name="list" scope="request">
<logic:iterate id="ele" name="list" scope="request">
<tr bgcolor="#FFFFFF">
<td>
<bean:write name="ele" property="id" />
</td>
<td>
<html:link href="category.do?command=edit" paramId="id"
paramName="ele" paramProperty="id">
<bean:write name="ele" property="name" />
</html:link>
</td>
<td>
<bean:write name="ele" property="subDesc" />
</td>
<td>
<bean:write name="ele" property="createTime"
format="yyyy-MM-dd" />
</td>
<td>
<html:link href="category.do?command=edit" paramId="id"
paramName="ele" paramProperty="id">
<bean:message key="system.modify" />
</html:link>
<html:link href="category.do?command=delete" paramId="id"
paramName="ele" paramProperty="id">
<bean:message key="system.delete" />
</html:link>
</td>
</tr>
</logic:iterate>
<logic:present name="pagingBar" scope="request">
<tr bgcolor="#FFFFFF">
<td colspan="5" align="right">
<bean:write name="pagingBar" filter="false" scope="request" />
</td>
</tr>
</logic:present>
</logic:present>
<logic:notPresent name="list" scope="request">
<tr bgcolor="#FFFFFF">
<td colspan="5">
<bean:message key="system.message.null" />
</td>
</tr>
</logic:notPresent>Action代码:
//分页
public ActionForward paging(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
//获取当前页码
String currPage = request.getParameter("currPage");
String action = request.getContextPath()+"/baseData/category.do?command=paging";
String hql = "from Category";
//分页查询
Map map = this.getPage(hql, recPerPage, currPage, action,null);
//将结果集放到request中
request.setAttribute("list", map.get("list"));
//将结果集放到分页条中
request.setAttribute("pagingBar", map.get("bar"));
return mapping.findForward("findAllSuccess");
}
请问具体怎么修改?谢谢!