A Servlet has three different life cycle methods: init() service() destroy()
A servlet has three states, as shown in the diagram above: new, ready, and end. If a servlet instance is created, the servlet is in a new state. Servlet enters the ready state after running the init() method.
Initialization is the first part of the Servlet life cycle, and it involves the creation and initialization of any resources that the Servlet may require in order to fulfil requests.
Share a personalized message with your friends.