Hey,
I am not sure whether this is the right place to ask this but I figured that maybe someone here has used JFileUpload for uploading files to a server.
I just downloaded the applet and tested it out on my server and uploading works as long as the files are smaller that 1,000 bytes, i.e. very small images. Whenever I try with a larger file I get the error:
Upload started ...Upload failed : java.net.SocketException: Software caused connection abort: socket write error
When I look at the request sent to my server, I see that it is using a POST method but it is not sending any data, whereas with the smaller images I can see the data being sent. I think there might be a limitation for the file size in the applet but I couldn't see anything in the applet_http.js file. Also, I think I might be reading the browser request in a wrong way. Here's how I do it:
...s = socket.accept();
// Read in request.
BufferedReader is = new BufferedReader( new InputStreamReader( s.getInputStream() ) );
String clientData = "", line;
int lineCount = 0;
do {
line = is.readLine();
clientData += line + "\n";
lineCount++;
}
while ( is.ready() );
Any ideas? Thanks.