This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i have wrote a little servlet which reacts on zthe method DoGet(). I have coded it that way, that the client/browser sends via GET the parameter time=XXX. here, I define the time, the servlet should wait till it response with some text. I did this because I wanted to test if my servlet is really multithreading, but it seems thats not that way.
My Test: I started 1 browser requesting my servlet with the parameter ?time=20 and another browser with time=2 and I started the second request directly after the first one. But my problem is, that the second request with time=2 gets his response after the first request gets his response after 22 seconds.
Why is it that way. I thought that the servlet automatically starts a new thread. shouldnt the seconds request with time=2 gets his responds first???
my servlet is behind a tomcat server. Shall I configure the tomcat server a bit???