struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Young, Wayne" <>
Subject RE: Bug in tomcat or the JDK (testing it on 1.2.2)
Date Wed, 28 Mar 2001 14:51:22 GMT
I've been seeing this under JDK 1.3 also. I also get a similar error when my
stylesheet loads.


-----Original Message-----
From: Johan Compagner []
Sent: Wednesday, March 28, 2001 8:49 AM
To: Struts
Subject: Bug in tomcat or the JDK (testing it on 1.2.2)


If i use Tomcat as a static (gifs) and dynamic (jsp) server, that is mostly
used inside a debugging evironment or maybe if it is specified that
in the webapp\app dir must be served by tomcat (still find this a very bad
then i noticed that i get socket exceptions on specifiek files those files
something in common they are the larger files in my app: 31290 and 23281

this is the error:
2001-03-28 04:40:07 - Ctx( /financialtools ): IOException in: R(
/financialtools + /overlib.js + null) socket write error

Then i went testing in the source code of
org.apache.tomcat.request.FileHandler where it is thrown.
And after sometesting i found out that a picture can't be larger then 16383
because if it is 16384
then an exception will be thrown. I tested this with the read in buffer:
byte[] buf = new byte[16383];

if that number is larger then 16383 i wil get a exception when i write it.
so if i keept it 16383 then the first write to out.write(buf, 0, read); will
but the next bloc will fail. And if i make it 16384, out.write(buf, 0,
read); will fail the first time!

As far as i can see now it comes from the jdk it self: socket write error (code=10053)
 void [], int, int, <-----------
 void [], int, int)
 void org.apache.tomcat.service.http.HttpResponseAdapter.doWrite(byte [],
int, int)
 void org.apache.tomcat.core.BufferedServletOutputStream.doWrite(byte [],
int, int)
 void org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush()
 void org.apache.tomcat.core.BufferedServletOutputStream.write(byte [], int,
st, org.apache.tomcat.core.Response)

So is this a bug of Tomcat or the JDK it self? But can't send more then 16K?
that is a bit strange.

I know this is not a tomcat list but when developing with struts i came
accross this and i don't want
to have another list that i have to monitor and i know there are a few
tomcat developers here.


View raw message