This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Can anybody explain me the difference between init(ServletConfig config) method and init() method. API says simply override no arg init() method which will be called by init(ServletConfig config) method? What do you mean by this?
GenericServletClass implements ServletConfig and Servlet Interface.
the default behavior of GenericServlet class is when init() is invoked it calls init(ServletConfig) this class now has reference of ServletConfig from Servlet Container. the extending class has to call getServletConfig() to get reference of Config from container.
getServletConfig() method call can be avoided /Extending class can obtain ServletConfig reference by calling super.init(ServletConfig).