Download tomcat (reproduced on 8.5.56)
In [tomcat root]/conf/tomcat-users.xml, create an admin with access to the manager panel:
<user username="admin" password="admin" roles="manager-gui"/>
(this allow to start and stop individual webapps, without a server restart)
Deploy a ZK webapp as a war file (reproduced with a new project created from maven archetype ZK EE webapp)
Run the server
Open the application's zul page (a client must have connected in order to trigger the issue)
Open the server's webapps manager (http://localhost:8080/manager/html)
use the "stop" button in the application list to stop the ZK webapp
Check server logs / console ([tomcat root]/catalina*.out)
During DHTML Layout servlet operation, ThreadLocalsManager is used to store the pageDefinition in a threadlocal, but it's not cleaned up at the end of the transaction.
This cause a minor memory overhead, and trigger messages in tomcat such as:
Unused threadLocal objects should be released after the pageDefinition is no longer needed as a threadLocal value at the end of the page request.