Small doubt on servlets class
posted 10 years ago
Yes; GenericServlet is a protocol-independent implementation of Servlet, basially providing storage of the ServletConfig and a new init() method for convenience. HttpServlet takes this one step further, and adds the convenient doXxx() methods. You can extend either (or implement Servlet directly) to create a servlet, but using HttpServlet as a base class is most common.Is GenricServlet the super class for HttpServlet..
Initialisation is a stage in the servlet's life invoked by the container. The servlet can use the initialisation stage to manage any start-up conditions, such as extracting initialisation parameters from the ServletConfig, or perhaps opening connections to persistent data stores (you must however be careful about multi-threading if you do this). It isn't that the servlet is initialising anything else, but rather that the servlet itself is being initialised.What is the role of initialization in Servlet life cycle. what actually it initializes.