Servlet life cycle

zhaozj2021-02-16  90

...................... ..

IF an instance of the servlet does not exist, The Web Container

Loads the servlet class. Creates an instance of the servlet class. Initializes the servlet instance by calling the init method. Initialization is covered in Initializing a Servlet. Invokes the service method, passing a request and response object. Service methods are discussed in Writing Service Methods.

If The Container Needs To Remove The Servlet, IT Finalizes The Servlet by Calling The Servlet's Destroy Method. Finalization Is Discussed in Finalizing A Servlet.

转载请注明原文地址:https://www.9cbs.com/read-12185.html

New Post(0)