请教struts分页问题 用struts的标签 <s:iterator> 标签在页面上遍历,记得 必须先引入标签库 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还有,我的代码的页面是用struts标签显示的,我把相关代码再帖出来吧<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"); }请问具体怎么修改?谢谢! 第一个JAVAWEB出错了,请高手指点一下 请问有关jsp页面乱码的处理 关于javascript的问题,大家来帮帮我 求助~~JSP里连接SQLSERVER2000的小问题~~ 超诡异啊。同样的语句,直接在叶面里就可以连数据库,想写个bean就不行了? 求jsp指导,本人完全的菜鸟,急急急 请问如何才能在JFreeChart中的折线图上显示出双Y轴 关于Spring配置文件的 路劲获取 问题 ? servlet 配置问题 weblogic7+jb7如何调试jsp页面?送分!!!!!!!!!!! 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");
}
请问具体怎么修改?谢谢!