Answered Questions

  • What is the servlet life cycle?

    Each servlet has the same life cycle:A server loads and initializes the servlet (init())The servlet handles zero or more client requests (service())The server removes the servlet (destroy()) (some servers do this step only when they shut down)

    Sonikanth

    • Feb 22nd, 2010

    Servlet Life cycle contains public void init(ServletConfig cg)public void service(HttpServletRequest req, HttpServletResponse res)public void destroy()init() with zero arguments is the helper method for init(-) with one parameter.

    Santosh Kumar

    • Oct 13th, 2005

    Servlet life cycle defines the life process of the servlet. It has certain methods that comes into existence throughout the utilization of the servlet. Generally newInstance() method creates an object...