posted 15 years ago
Well, there's no stopping anyone from writing a constructor for a servlet. However, you need to keep in mind that the servlet context is NOT initialised at the point when the constructor is invoked.
You can most definitely perform some house-keeping tasks like initialisations or checking on the availability of services/resources, but that's the very purpose for which the init() is available as part of the servlet's lifecycle.
In my opinion, there's no particular 'purpose' to defining a constructor for a servlet. Of course, one might never know when a skewed requirement comes along mandating a constructor definition for a servlet. Do let us know if you're already aware of any such requirement.