Check the API.
public void contextInitialized(ServletContextEvent sce)
Notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialization before any filter or servlet in the web application is initialized.
contextDestroyed
public void contextDestroyed(ServletContextEvent sce)
Notification that the servlet context is about to be shut down. All servlets and filters have been destroy()ed before any ServletContextListeners are notified of context destruction.
But guys, the answer to my question??