• Post Reply Bookmark Topic Watch Topic
  • New Topic

initialization of servlets

 
sanj singh
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very basic problem but its better that it is cleared soon.Suppose there are 100 users all accessing a particular web page at the same time.Does it mean that that the Servlet engine makes 100 instances.If not how many instances does it make?
regards
ss
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is indeed a basic fact.
The servlet engine makes one copy of the servlet object. Each request gets its own Thread. Any number of Threads may be executing servlet code in the one object at the "same" time.
This fact is covered in all basic servlet documentation because it requires a change in programming style for programmers who are used to single Thread applications.
Bill

------------------
author of:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!