Programming Thoughts
J2EE - Pagination
Example

Displaying search results in pages

Most applications are data driven, users search large tables, and expect search results split into multiple pages. This series of articles describes a simplified version of a Template helper class, named list cache, that was developed over the years according to user requirements. This article amalgamates the design in previous articles, Full List, Base Record List, By Ids, By Index, into a working example.

Live example

A demonstration application can be accessed here. The start page looks like the following.

Figure 1: Starting page

Download

Source code of a demonstration application can be downloaded here as a zip file. It requires the following.

  • JDK 8 or better
  • Maven 3
  • Jakarta EE server, such as Tomcat 9

It compiles into a WAR file and is run from the /example2 URL page.

The application searches the games from a 2021 copy of the Board Game Geek database. Credit to Jen Wadkins at Kaggle for compiling the dataset files.