But what will happen to that first request if second's response is received before or so.
The first request continues to run in its own Thread. IF the servlet has been coded properly with no user data being stored in servlet instance variables, there will be no interference. The API provides the session concept to help keep the user data separate. If both requests are from the same client browser, the browser will keep the responses separate.
If the servlet has been coded improperly the responses may get each other's data mixed up but the actual response output will still go to the right place.
The key phrase here is "coded properly" - understand how the data must be kept "Thread safe" and your doubts should vanish. If not, figure out another way to state them.
The question of which Thread gets CPU time and finishes first is decided by the JVM just like any other multithreaded program.
Bill
[ September 04, 2006: Message edited by: William Brogden ]