tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Unable to disable output buffering
Date Mon, 02 Jul 2007 09:32:07 GMT

Fabio, it just sounds all wrong....
I have a sneaky suspicion that if you made the buffer very large, your 
problems will fix themselves, but thats still not the solution.
I actually think you are not telling the client the size of the data.... do 
you set
        response.setContentLength("How Big");
anywhere?

I forget all the details, but its something like this...
If you dont set the size.... TC will drop the connection when the data is 
sent, the old HTTP spec.
If the data is massive with no size, TC will start chunking, and the client 
has to wait for that last special char, to know its done.
If it all fits into the buffer, TC will create the headers, because it can 
see all the data.... and that will probably fix it, but its just luck.

But if you give it the size.... the client will know how much data is 
coming, and wait for it.... so if the browser sits there waiting forever, 
you know theres something wrong, like the servlet isnt sending all the data, 
ie header size is greater than actual data sent.

I just think you should give the client enuf info to decide for itself.... 
theres alot of internet between server and client, if something crashes, 
client should still be able to say, hey user you need to refresh.... I think 
its the only way.

Why wont the above work?... maybe you should post your code...

----- Original Message ----- 
From: "Fabio Rossi" <paranoid_fabio@yahoo.it>
To: <users@tomcat.apache.org>
Sent: Monday, July 02, 2007 10:49 AM
Subject: Unable to disable output buffering


> Hello.
>
> I need to disable output stream buffering. I tried with 
> response.setBufferSize but i noticed that Tomcat does not permit to set a 
> level lower than the standard 8k.
> Then I read that the solution is to specify the connector property 
> socketBuffer="-1" in server.xml but again, it does not work for me. If I 
> print the current buffer size during the execution of the servlet I get 
> again the same 8192.
>
> How can I do do disable output buffering? I need that an exception is 
> raised even if the client fails to read the last byte of the stream...and 
> with output buffering it's not possibile.
>
> Please help. Thank you.
>
> ---------------------------------
>
> ---------------------------------
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail 


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


Mime
View raw message