日期:2014-05-20 浏览次数:20705 次
<c:forEach var="bm" items="${list}"> <tr><td align="center"><input type="checkbox" id="sel" name="sel" value="${bm.id}"></td> <td align="center"><img src="<%=basePath %>images/bg_users.gif"></td> <td align="center"><img src="<%=basePath %>images/t_5.gif"><img src="<%=basePath %>images/t_5.gif"> <img src="<%=basePath %>images/t_5.gif"></td> <td align="center"><c:out value="${bm.nickname}"></c:out></td> <td align="center"><c:out value="${bm.others}"></c:out></td> <td align="center"><a href="ListAllUserServlet?who=${bm.others}"><img src="<%=basePath%>images/xie.jpg"></a></td> <td align="center"><a href="main.files/updUser.jsp?zt=${bm.others}"><img src="<%=basePath %>images/xg.gif" style="cursor:hand"></a></td> <td align="center"><a href="delUserServlet?zw=${bm.others}"><img src="<%=basePath %>images/sc.gif" style="cursor:hand"></a></td> </tr> </c:forEach>
------解决方案--------------------
设置一个PageBean,存储当前页,总条数,每页最大对象数,然后向DAO传入PageBean的属性,使用sql实现分页
------解决方案--------------------
select * from ( select row_.*, rownum rownum_ from ( select person_id, chn_name, chn_firstname_py from t_pbase_info ) row_ where rownum <=20 ) where rownum_ >=11