日期:2014-05-19 浏览次数:20739 次
<logic:iterate id="a" name="content" property="list" type="model.Shoes">
id: <bean:write name="a" property="id"/>
name: <bean:write name="a" property="name"/>
</logic:iterate>
<a href="javascript:void(0)" onclick="nextpage()">下一页</a>
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
//一个分页用的类
FenYe fenye = new FenYe();
userDaoImplement userdaoimpl = new userDaoImplement();
//从数据库取出当前页的数据(getAllShopes方法完成)
List<?> list= userdaoimpl.getAllShoes(fenye.getPageSize(),fenye.getPageNum());
//fenye类中list属性用来存放当前页数据
fenye.setList(list);
//把分页类传到jsp页面
request.setAttribute("content", fenye);
return mapping.findForward("success");
}