Domino & REST: Listeners for Initialization & Destroying of a Servlet 

By Sven Hasselbach | 2/27/17 5:47 AM | App Dev - Open Source | Added by Oliver Busse

If you need to know when your Servlet is initialized or destroyed, you can use a ServletContextListener in your application. First, create the class AppServletContextListener and implement the javax.servlet.ServletContextListener interface.