I would like to know the exact reason for why a servlet
doesnot have a constructor , the reason given in the
book is not satisfactory.
thanks in advance
A servlet is a container managed object. Since the life cycle is managed, the constructor is not very useful to initialize a servlet. Instead, you use the init() method to do any initialization.
The difference is that servlet construction and servlet initialization are not the same (object lifecycle vs servlet lifecycle).
So it is intentional that servlets don't use constructors!!!!I've been trying to get mine to work for months. Now I feel silly. So my next question is can you overload the init() method?