ServletContextListener does not execute on deployment
问题 I am trying to initialize a streaming object when my war file is deployed. I wrote an Initializer class that implements ServletContextListener and added a listener-class tag to my web.xml. The issue is that the ContextInitialized Event occurs when I make the first request to my application and NOT when the app is deployed. Is there a better way to initialize my application? EDIT: public class Initializer implements ServletContextListener{ @Override public void contextDestroyed