init()method is called by the Web Container on servlet instance to initialize the servlet.
Signature of init() method :
public void init(ServletConfig config) throws ServletException
service()method each time the request for servlet is received. The service() method will then call the
doPost()methods based on the type of the HTTP request, as explained in previous lessons.
Signature of service() method :
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException
destroy()method before removing servlet instance, giving it a chance for cleanup activity.