DAO Section: Middle tier
Declare the variable Pagerbook pagedata sumrow sumpage
Find the total number of records ID uniquely identified: SELECT COUNT (ID) as rowsum from book;
Find out the total number of pages;
Determine the total number of pages is 0 o'clock
Find the record data of the current page pagedata (flag= (Current page-1) * Number of records)
Select Top "+flag+" from book where ID not in (select Top "+flag+" ID from book)
+++++ NOTE: Because the ID is used to filter, so the record behind is the column with the ID to filter ————— ID (here)
Servlet section: Server-side
To determine if a string or a negative number is assigned to a nowpage in a URL: To make a judgment, handle the exception
The exception that appears is the data format
JSP part: Browser side
Get the Pagerbook object (pager<book>) and then, under the original table, make a decision to add a hyperlink
Parameters passed to the Booklist page booklist?nowpage=<%=%> home > 1; previous page, home < Total page, next page
Javaweb Note -03 (BS and pagination of business processes)