Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why we have to have the Servlet in the servlet directory, before the webserver is up

 
Siva kandasamy
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why we have to have the Servlet in the servlet directory,
before we start the webser up.? My understanding is, "Servlet is initialized only when it is called".
thanks
siva
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what you mean. Which directory are you referring to, and why shouldn't the Servlet be there?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64613
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet may be initialized well before its first reference. The web.xml may specify that the servlet be loaded upon startup, for example. Also, the container is free to load the servlet at any time as long as it is before a request is delivered to it.
 
Siva kandasamy
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David & Bear, Thanks you both.
Bear got it correct. Still I am not sure, why servlet has to made available ( ie. place in servlet directory and configure ) to the webserver , before the web server comes up.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic