The following is the paging function of a project in the previous two days. BlogDAO. the java file [java]/** returns multiple records based on the condition (all data in a table by default) */public List <Blog> list (String kw, Integer pageCur, Integer pageSize) {List <Blog> list = null; Integer limitaInteger = (pageCur-1) * pageSize; Integer limitbInteger = pageCur * pageSize; Object [] params = {limitaInteger, limitbInteger }; // input parameter list String sqlWhere = ""; String SQL = "select * from csdn_blog where first = 1"; if (kw! = Null &&! Kw. equals ("") {sqlWhere = "and topic like '%" + kw + "%'";} SQL + = sqlWhere; SQL + = "order by id desc limit ?,? "; ResultSetHandler <List <Blog> rsh = new BeanListHandler <Blog> (Blog. class); // convert the result set to BeanList try {list = qr. query (getConn (), SQL, rsh, params); // call the query function of the query interface} catch (SQLException e) {e. printStackTrace ();} return list;} blogmgmt. java file [java] private Integer pagenum; // page number [java] view plaincopyprivate List <Blog> allblogs; and provides the set get method [java] public List <Blog> getAllblogs () {return allblogs;} pu Blic void setAllblogs (List <Blog> allblogs) {this. allblogs = allblogs;} [java] public Integer getPagenum () {return pagenum;} public void setPagenum (Integer pagenum) {this. pagenum = pagenum;} list method [java]/** display blog list information */public String alllist () {request = ServletActionContext. getRequest (); blogtopic = request. getParameter ("blogtopic"); allblogs = blogDAO. list (blogtopic, pagenum, 10); num_allblog = blog DAO. countAllNum (blogtopic); num_allblogpage = num_allblog/10 + 1; return "index";} JSP file [html] <div class = "content"> <c: forEach items = "$ {allblogs}" var = "allblog"> <div class = "blog_list">