Hi, I am new to servlets and web container. From what I have read so far, I've gotten an impression that the web containers, in this case Tomcat, create only _one_ instance of each particular servlet upon start/[re]deployment of a web application. Any request to such servlet would cause a container to spawn a thread that would call upon this servlet instance's methods (service()...).
My first question is, that under any circumstances, does the container create a second instance of a servlet (obviously we are talking about a servlet with a unique registered name not all the servlets in the context)? I tried to verify this by placing `this' in a Hashtable during doGet/Post() call to see whether the Container creates a new one which apparently doesn't but I just want to make sure if my assumption is correct. If that's correct then it does not matter the servlet's variable be an instance variable or a class variable. Another question that arises (relating to the first question), does every newly created thread with the help of Container get accessed to that single servlet instance and pass the request/response objects to the servlet? Wanting to dig deeper into details, and I know this may not be an appropriate mailing list, but where does Tomcat container management actually create these threads? What java file to be more specifically? Thank You --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]