2. In this case, Is that destroy() of Myservlet class will be called by container? 3. is there any case like init(servletconfig) calling init() in GenericServlet ?... i mean destroy of Myservlet an call destroy of Genericservlet ..with super.destroy()?

Job of Init(ServletConfig) in GenericSerlvet -------------------------------------------- 1. Generic Servlet stores ServletConfig supplied to init(ServletConfig) as instance variable becuase someof the methods like getServletContext() need ServletConfig to get the context out of it.

2. calls init() method.

What we need to do in MyServlet extends GenericServlet(recomended way): ---------------------------------------------------------------------- CASE 1 : As init(SerlvetConfig) is used to store ServletConfig object. Do not over-ride that and over-ride init().

what happens: Continer calls the init(SerlverConfig) and that method inturn calls the over-ridden method init() written by us.

CASE 2: You can over-ride and init(ServletConfig) without disturbing the intent of it.