What is the lifecycle of a servlet context? Would its lifetime be exactly the same as servlet? I'm wondering when and how the methods ContectInitialized and ContextDestroyed of ServletContextListener will be called, would anyone please explain them to me? Thank you!
I think the Servlet Context exists outside the lifetime of a servlet since there may be many servlets sharing a context in a single "web application." Read the JavaDocs for the javax.servlet.ServletContext interface for the authoritative information. Bill