Monday, 4 June 2012

How does the Servlet Container handles concurrent requests ?


How does the Servlet Container handle concurrent requests ?

Servlet Containers usually manages concurrent requests by creating a new Java thread for each request.
The new thread is given an object reference to the requested Servlet, which issues the response through the same thread. This is why it is important to design for concurrency when you write a Servlet, because multiple requests may be handled by the same Servlet instance.

No comments:

Post a Comment