问题描述:

from applet I am sending data to asp script by post request. This works fine till the number of characters in data written is less then 138000 but when it increases this limit then applet give 500 error. My code snippet is as below

URL url=new URL(baseUrl);

HttpURLConnection conn=(HttpURLConnection)url.openConnection();

conn.setDoOutput(true);

conn.setFixedLengthStreamingMode(data.length());

conn.setRequestMethod("POST");

conn.setRequestProperty("Content-length", ""+(data.length()+1000));

OutputStreamWriter out = new OutputStreamWriter(conn.getOutputStream());

out.write(data);

out.close();

And exception given by java is as below

java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:96/makeCSV.asp

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

Please tell me how can I send large amount of data by post request from java applet.

网友答案:

This isn't a client side problem. You'll most likely have to change your server configuration.

相关阅读:
Top