wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet initialization" Watch "Servlet initialization" New topic
Author

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
sunil.
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.

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
Don't get me started about those stupid light bulbs.
 
subject: Servlet initialization
 
Similar Threads
Servlet Context and Servlet
servlet
Init()
what is the ServletConfig and usage
Lazy loading in servlet