init() metghod is called by the framework.But which class' object call init() method.Our servlet class or any other class' object.Similarly for service(). Bye. Viki. SCJP2.
Count the flowers of your garden, NOT the leafs which falls away!
posted 15 years ago
Hi Viki, The servletengine alias webcontainer calls these methods. Servlets are not standalone. init is called when the server starts. service is is called when a new browser-request is send to the servletengine. The service method runs automatically in a new Thread. This is a little simplified. Axel Axel