Programming Thoughts
J2EE - Pagination
Composite Cache Example

Displaying search results in pages

The previous article described a Template class, list cache, that aids pagination of search results in multiple, linked pages. This article describes a working example for download. It is similar to Example 2 but includes ratings distribution and searchable, individual user ratings of a game.

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 /example4 URL page. The start page looks like the following.

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.