How Servlet Requests are handled by Webserver internallly
satishbsk kumar
Greenhorn
Joined: Jul 24, 2009
Posts: 15
posted
0
Hi All,
Please clarify whether Server creates new thread(Servlet Instance) for each request.
Rgds,
Satish
Sebastian Janisch
Ranch Hand
Joined: Feb 23, 2009
Posts: 1183
posted
0
Unless you implement the SingleThreadModel, the container creates a new Thread for each incoming request. Note however that it does not create a new servlet instance, it works on the same unless you have different mappings for one servlet.
So watch out for thread safety.