The life cycle begins when container creates an object of servlet class and invokes the the init() method, and terminates with the container invoking the destroy() method.
The syntax of these methods is shown as below of this methods are shown below :
Following is the syntax of the init method
Code:
public void init(ServletConfig con) throws ServletException<br />
public void service(ServletRequest request , ServletResponse response ) throws ServletException, IOException
Following is the syntax of the destroy method
Code:
public void destroy()
Bookmarks