• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet statrt up

 
Gunaselan Varathan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a question on servlet deployment.

when we don't specify the <load-on-startup> value, when will the servlet get loaded in the container?

During start up or when the first request comes in.
 
Yogesh Hingmire
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on the Servlet container, ideally, or shall i say mostly 99% of the times the container would not load it on startup, if it is not specified in the web.xml.
It will then load it based on when the first request comes in.
I am not sure but i have heard of some containers who may load them in at
the start up even though you do not specify the <load-on-startup>.
The answer to your question though is if you dont specify , it won't load and will load only when the first request comes in.

Regards,
Yogesh
 
Gunaselan Varathan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Yogesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic