Chunking and Tomcat Servlets
843841Oct 6 2006 — edited Nov 8 2006HI all, I've got a method which transmits data to a java servlet. I;ve added Java 1.5's chunking capability on the client and it works on 1 machine with no problems. Yet a whole lot of others break...
Client side:
URLConnection con = null;
con = servletAddress.openConnection();
con.setDoInput(true);
con.setDoOutput(true);
con.setUseCaches(false);
if(chunked && supportsChunking()){
( (HttpURLConnection) con).setChunkedStreamingMode(0);
}
after this, i open a DataInputStream from the connection and send an object...
I get an exception on the reply...
java.io.IOException: Server returned HTTP response code: 501 for URL: http://xxxxxx.xxxxxxxxx.xxxxxxxx
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1133)
There is a bit of stuff on the forums about chunking but my problem seems to be on the server. Its generating a 501 not supported error, yet all versions of tomcat, and all JREs are identical. What could the reason be for 1 machien working and a whole bunch of others breaking?
Dan