Jose María Zaragoza wrote:
Hello:

I've got a concept doubt about if it's possible perform many calls to
the same servlet ( on the same session ) if the previous one didn't
finish.

Can you explain how precisely you would do that ?


I know that a connection is assigned to a thread.
If the client doesn't open more connection ( Keep-Alive: true ), all
requests are processed by the same thread.

Yes, but I am curious how you would make a browser send several requests in a row on the same connection, without waiting for the first request to return a response.


And if a request spends a lot of time when calling a servlet , is
that thread blocked until the servlet finish ?

Yes.  One thread handles one request at a time.
But several threads can be running the same servlet code, independently.

or each request is
processed by a new created thread ?

Only if the new request comes in through another connection.

This is my doubt : is that the right behaviour ?

I know that there is a only one instance by servlet, but I'm talking
about one scenario with only one browser and only one session web


Mmm. That's a bit obscure.


If anyone knows about a good documentation about this question, that
would be helpful for me


The HTTP RFC (#2616 ?), and the Java Servlet Specification.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to