• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet instances and init() method and init(ServletConfig)

 
sharana sharana
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ranchers i have question about , servlet intialization method()
it is stated that from specs , servlet.init(servletConfig ) method is called By the Container exactly once when the servlet object is intialized and set for service.once intilization successfull then servlet is ready to service.
lets assume container maintains a five insatnces of a servlet A, then how manytimes init(ServletConfig) is called???
pls clarify this
thanks in Advance
sharan
 
Andres Bonifacio
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's still once. The only thing about your scenario is you got 5 instance of the servlet. So each instance will receive a one time call on their init() method.
 
sharana sharana
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic