Programming Thoughts
Struts 2 - Server State per Browser Tab
Popups Example

The same page in different browser tabs that don't interfere with each other, improved

Users expect pages in different tabs to not interfere with each other's session data, even if they're the same page but for different records. The previous article detects when a users open a link in a new tab, thereby confusing tab identification and requiring copying of per-tab session data. This example handles each tab having its own set of floating browser windows.

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. Warning: it is 615MB as it contains a huge, embedded database. 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 /example6 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.