pagination shows a lot of use in actual development, here is a list of employees to display the example, using no paging, pagination (fake pagination and true pagination) to display, with complete code, if you want to learn pagination, this is a good learning material.
1, do not use pagination to display, the code is as follows:
emp_list.jsp:
<%@ page contenttype= "text/html" pageencoding= "GBK"%> <%@ page import= "java.sql.*"%>
The results are as follows when the page is displayed without paging:
2, the use of false pagination to display, the code is as follows:
emp_list_false.jsp:
<%@ page contenttype= "text/html" pageencoding= "GBK"%> <%@ page import= "java.sql.*"%>
The effect of displaying with false pagination is as follows:
3, the use of true pagination to display the list of employees, the code is as follows:
emp_list_true.jsp:
<%@ page contenttype= "text/html" pageencoding= "GBK"%> <%@ page import= "java.sql.*"%>
The results of true pagination display are as follows: