I have a servlet with a persistent connection open to a client
(browser), and when the browser is closed or the user hits the stop
button, the connection is closed, but the servlet isn't throwing the
IOException when it should do it.
(i guess)
As i could notice, after about 8k of data being wri
Paulo Pizarro wrote:
I have a servlet with a persistent connection open to a client
(browser), and when the browser is closed or the user hits the stop
button, the connection is closed, but the servlet isn't throwing the
IOException when it should do it.
(i guess)
As i could notice, after about
What do you mean by ok?
As far as i can see, the connection closes and writing data to the
OutputStream should generate an IOException, but this isn't happening... :-(
The problem is that my servlet is inside a loop, and needs to know when
the client closes the connection, so it can exit the loo
, 2004 1:37 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 5 is not generating IOException when connection
> closes
>
> If you say it's ok, it means that tomcat really buffers the data and
> only generate the IOException when this buffer is full, and that this
>
ni [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 08, 2004 1:37 PM
To: Tomcat Users List
Subject: Re: Tomcat 5 is not generating IOException when connection
closes
If you say it's ok, it means that tomcat really buffers the data and
only generate the IOException when this buffer is full
Vitor Buitoni wrote:
What do you mean by ok?
As far as i can see, the connection closes and writing data to the
OutputStream should generate an IOException, but this isn't happening...
:-(
The problem is that my servlet is inside a loop, and needs to know when
the client closes the connection,
Remy,
I also tried using a PrintWriter, and i got the same results.
checkError() only returns true when about 8k of data are sent after the
connection has been closed.
You said that there was indeed something wrong... I'm using Tomcat
5.0.16 , do you know if this version has already been fixed
Vitor Buitoni wrote:
Remy,
I also tried using a PrintWriter, and i got the same results.
checkError() only returns true when about 8k of data are sent after the
connection has been closed.
Yes, it's normal, since the normal stream will not throw an exception,
the writer can't know about an erro
That's it! :-)
socketBuffer="-1" really fixed the issue.
thanks a lot,
Vitor
Remy Maucherat wrote:
Vitor Buitoni wrote:
Remy,
I also tried using a PrintWriter, and i got the same results.
checkError() only returns true when about 8k of data are sent after
the connection has been closed.
Ye