tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Fuortes <>
Subject Problem with POST to servlet: 16384 bytes maximum?
Date Thu, 07 Aug 2008 18:18:28 GMT

I have a problem with POSTing an XML file to a servlet which writes  
the XML to disk. If the XML file is less than 16384 bytes all goes  
well. If it's bigger the first 16384 bytes are written correctly, the  
rest all all 00s. The lenght of the file is the correct one as in the  
Content-Length: http header.

The servlet is very simple (I did not write it), the relevant parts are:

		File file;
		FileOutputStream out2;
		DataOutputStream out3;
		file = new File(req.getRealPath(filePath));
		out2 = new FileOutputStream(file);
		out3 = new DataOutputStream(out2);
		byte[] theBytes=new byte[bytesAvailable];;

Can anyone help? Is there a buffer limit somewhere that I have to  
I'm using Apache 2.063/Tomcat/4.1.29-LE-jdk14 on MacOS 10.5.3


Michele Fuortes

Michele Fuortes, M.D., Ph.D.
Assistant Professor
Department of Cell and Developmental Biology
Cornell University  - Weill Medical College

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message