J
Joe Attardi
Am I correct in the assumption that an instance of ServletContext
associated with one particular web application will remain "alive"
during the entire life of the application?
I previously had some setup/cleanup code in the init() and destroy()
methods of a servlet, but since the container is free to discard and
re-initialize a servlet instance, my cleanup code was being called
while the application was still running.
If I move this code to a ServletContextListener, will the
contextInitialized and contextDestroyed only be called once for the
lifetime of the application?
associated with one particular web application will remain "alive"
during the entire life of the application?
I previously had some setup/cleanup code in the init() and destroy()
methods of a servlet, but since the container is free to discard and
re-initialize a servlet instance, my cleanup code was being called
while the application was still running.
If I move this code to a ServletContextListener, will the
contextInitialized and contextDestroyed only be called once for the
lifetime of the application?