Interface ServletContextListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
ConfigureListener

public interface ServletContextListener extends EventListener
Interface for receiving notification events about ServletContext lifecycle changes.

In order to receive these notification events, the implementation class must be either declared in the deployment descriptor of the web application, annotated with WebListener, or registered via one of the addListener methods defined on ServletContext.

Implementations of this interface are invoked at their contextInitialized(jakarta.servlet.ServletContextEvent) method in the order in which they have been declared, and at their contextDestroyed(jakarta.servlet.ServletContextEvent) method in reverse order.

Since:
Servlet 2.3
See Also: