by super.init(config) we can get intialization parameters and we can place variables which should be initialized once other than this is there any need of super.init(config) in servlets?
In servlets, if you override the init() method, you'll have to store the ServletConfig somewhere. You can either 1. Declare a ServletConfig class member 2. Or let the parent class store it, by calling super.init(config)
init(ServletConfig config) - 1. Called by Sevlet Container to indicate that the servlet is ready for service. 2. The implementation of this method in GenericServlet stores ServletConfig for later use, which can be retreived later using getServletConfig(). 3. When overriding this method, call super.init(config). However, instead of overriding this method it is better to override init(). init() will be called from init(ServletConfig), and you won't need to to call super.init(config). 4. init(ServletConfig) is called once after instantiating servlet.