Say that you want to display 100 products on your
JSP. Displaying the whole 100 items in one page is not a good idea. So you divide those 100 records into 5 page actions with next and previous button. You read all the 100 records from the database and store them in a Java Collection, and show 25 items at a time on your JSP based on some use action.
Google for "JSP pagination" and you will get a number of articles.