It is adviced to override init() method but if you are overriding init(ServletConfig) then we need to call super.init(ServletConfig). Why?
I learned that init() is called in init(ServletConfig) of super class so that it can give servletness to the servlet. If that is the case then we can override any init method and then call super.init() so that the servletness of the servlet is gained.
Thanks Clifton. One more basic question on this. Which method does the container implicitly calls if you have not overrided any init() method from superclass? init() or init(ServletConfig)? [ April 10, 2007: Message edited by: Atul Savant ]
Container calls both the method. It will call init(confi) followed by init(). If you don't override init(), the default implementation will be called and the default implementaion of init() does nothing. The container calls init() from inside init(config) method. [ April 10, 2007: Message edited by: Tridib Samanta ]