If a Web application is deployed on a server ( in my case its apache 7) … And if I try to use different computers to access my web application. It should handle all the requests by itself and create an instance of a web application for each and every different request? Am I right?
Using Dynamic Web Project.
Nope. There is just one instance of the web application deployed from a WAR file. Also there will only be a single instance of each servlet.
The only entities that are created per instance1 are
HttpServletRequestandHttpServletResponse. IF two computers access the exact same URL at the same time, two instances of aforementioned objects will be created and passed to the same servlet.1: Tomcat actually reuses instances of
HttpServletRequestandHttpServletResponseafter the request is processed. But this is probably a microoptimization, irrelevant to the question.