commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Kuek <ben.k...@abridge.com.au>
Subject [FileUpload] Servlet stopping at servletFileUpload.parseRequest(request)
Date Thu, 05 Jul 2007 02:18:51 GMT

Hello,

I am using commons-fileupload-1.2

I am trying to upload a multipart/form-data from a client application 
(written in C#)
to the servlet.

The servlet stops at:

servletFileUpload.parseRequest(request);

returning an internal server error (500) to the client.
There are no error messages printed.
System.out.println(exception.getMessage()); doesn't seem to do anything


-------------------------------------------------------------------------------------------


For testing, I made sure that the client sent the following string 
(example from RFC 1867):

Content-type: multipart/form-data, boundary=AaB03x
--AaB03x
content-disposition: form-data; name="field1"
Joe Blow
--AaB03x
content-disposition: form-data; name="pics"; filename="file1.txt"
Content-Type: text/plain
... contents of file1.txt ...
--AaB03x--


-------------------------------------------------------------------------------------------


In the servlet, I made sure that the string is received by printing the 
request stream:

               //int intChar;
               //BufferedReader testBR = request.getReader();
               //while( (intChar = testBR.read())  != -1) {
               //    System.out.print((char)intChar);                     
               //}
               //testBR.close();

               // I've confirmed that the string printed are as sent by 
the client
              
               // Servlet will not move pass this line
               List items = servletFileUpload.parseRequest(request);
-------------------------------------------------------------------------------------------



Am I doing something wrong?

Warmest regards,
Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message