The javax.servlet.Servlet interface defines three methods known as life-cycle method. There signatures are:
Java Code:
public void init(ServletConfig config) throws ServletException
public void service( ServletRequest req, ServletResponse res) throws
ServletException, IOException
public void destroy()
Requests are handled by the service() method which may delegate the request to the doXxx() methods (provided its an HttpServlet).