Hi, we are trying to develop a servlet, but ive encountered some problems
with the concurrency. 
The problem is that only 2 HttpRequest is dispatched at the same time.

the doPost body is the following:

<code>
protected void doGet(HttpServletRequest request, HttpServletResponse
response) 
{       
  System.out.println("START");
  try { Thread.sleep(5000); } catch (InterruptedException e)
{e.printStackTrace();}

  response.getWriter().write("Hello World!!");

  System.out.println("END");
}
</code>

The request is waiting for 5 seconds, and later, return "Hello World!"

In our tests, when i launch 4 request, only 2 is running at the same time,
and when the first finiched, the third request is proccesed..

¿How can I solv this problem?

PD: Sorry, im Spanish, and my English is not well.
-- 
View this message in context: 
http://www.nabble.com/Servlet-Concurrency-problem-tp16583003p16583003.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to