When a web application is deployed into a container, the following steps must be performed, in <b>this order</b>, before the web application begins processing client requests. � Instantiate an instance of each event listener identified by a <listener> element in the deployment descriptor. � For instantiated listener instances that implement ServletContextListener, call the contextInitialized() method. � Instantiate an instance of each filter identified by a <filter> element in the deployment descriptor and call each filter instance�s init() method. � Instantiate an instance of each servlet identified by a <servlet> element that includes a <load-on-startup> element in the order defined by the load-onstartup element values, and call each servlet instance�s init() method.
Thanks for the valuable information. I missed it while reading the specifications as I skipped the ch 9. I was thinking that the container have map of all resources while loading the applicatin and it instantiated the listeners and filters as n when required to avoid the memory usage.