• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

init

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when is the init for a servlet called?

Is it called on first request? or is it called on server startup?

Is it like on start of server,the container loads all the classes and also calls the init methods of all the servlets?Is it for all the servlets of only for those whose <load-on-startup> is configured in the DD?
 
vani venkat
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if load-on-startup is a non negative integer, servlet is loaded when the container starts. that is its init will also be called. so loaded servlet is ready to serve clients. of there is no load-on-startup specified in DD, loading a servlet is container dependant.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic