Stanley Walker wrote:so does that mean that for n number of requests , there will be n instances of that servlet...
and all this would be retained in the server memory right until the web server is shut down?
for n number of requests , there will be ONE instance of that servlet.
The container is allowed to unload the servlet if it decides it needs to, and the servlet should ensure that it releases any resources it hold and then reacquire if the servlet is loaded again.
In practice however, the servlet (in my opinion) the container is unlikely to unload a servlet, and the servlet should be stateless so the unload/reload should not be an issue.