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
从applet我通过post请求将数据发送到asp脚本。这样可以正常工作,直到写入的数据中的字符数小于138000,但是当它增加此限制时,applet会给出500错误。我的代码片段如下
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给出的异常如下
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.
请告诉我如何通过java applet发布请求发送大量数据。
1 个解决方案
#1
0
This isn't a client side problem. You'll most likely have to change your server configuration.
这不是客户端问题。您很可能必须更改服务器配置。
#1
0
This isn't a client side problem. You'll most likely have to change your server configuration.
这不是客户端问题。您很可能必须更改服务器配置。