It's not a secret anymore!
The moose likes Servlets and the fly likes Servlet initialization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet initialization" Watch "Servlet initialization" New topic

Servlet initialization

sunil kumre
Ranch Hand

Joined: Dec 23, 2000
Posts: 64
Why servlet initialization is done using init() rather than a constructor?
thanks in advance
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Constructors for dynamically loaded classes (such as servlets) could not accept arguements. Using the init method serves to provide for any initialization that may be needed.


So much trouble in the world -- Bob Marley
I agree. Here's the link:
subject: Servlet initialization
It's not a secret anymore!