aspose file tools*
The moose likes Servlets and the fly likes Servlet init Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet init" Watch "Servlet init" New topic
Author

Servlet init

Mortin kim
Ranch Hand

Joined: Nov 15, 2007
Posts: 44
HI.,
i have one application with 100 servelts.all contains inti() method implemented,so when i deployed the application in server,all the inti methods inside 100 servlets will get called..?or when i sent request to that particular servlet then only init method will get called..?

Thanks
Kim.
Sundar Ram
Ranch Hand

Joined: May 22, 2006
Posts: 102
>,all the inti methods inside 100 servlets will get called..?or when i sent >request to that particular servlet then only init method will get called..?


By default each servlet gets initiated only when that servlet is requested. You may change this behavior by using <load-on-startup> element which will initialize your servlet when the application is deployed.


SCJP 5.0 | SCWCD 1.4
http://heysundar.blogspot.com
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Sundar means when the servlet is first requested. So init is not called for any other requests besides the first one.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet init