tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajeev Jha <jha.raj...@gmail.com>
Subject Re: Rephrased: Maximum number of simultaneous HTTP connections
Date Tue, 04 Apr 2006 10:00:17 GMT
TP
If the thread servicing your request blocks, the browser will not quit. 
The browser would wait the min( browser time-out ,response stream is 
closed). this is the trick many people use.

doGet(request, response){
    out = response.getOutputStream();
   // when you write something
  out.write(bytes) ; out.flush(); response.flushBuffer();
 // block on some notification
 out.close();
}

>>
>>> Remy Maucherat schrieb:
>>> But you said that the connection will not close, when the doGet() or
>>> doPost() method returns, which of course make a lot of sense. Otherwise
>>> Persistent connections would not be possible at all.
>>>
>>> So if that's true, then I should be able to write to the 
>>> OutputStream of
>>> the HttpResponse at a time, when the doGet() and doPost() method has
>>> returned.
>>>
>>> Why would it not work?
>>
>>
>>
>> The connection would not close, but all the objects provided by the
>> Servlet API are only accessible during the execution of the service
>> method of the Servlet. For example, in Tomcat's case, these are
>> recycled.
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message