commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Kuek <>
Subject [FileUpload] Servlet stopping at servletFileUpload.parseRequest(request)
Date Wed, 04 Jul 2007 06:50:14 GMT

I am new to writing servlets and 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:


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
content-disposition: form-data; name="field1"
Joe Blow
content-disposition: form-data; name="pics"; filename="file1.txt"
Content-Type: text/plain
... contents of file1.txt ...

In the servlet, I made sure that the string is received:

                int intChar;
                BufferedReader testBR = request.getReader();
                while( (intChar =  != -1) {

                // string printed are as above
                // code stops here
                List items = servletFileUpload.parseRequest(request);

Am I doing something wrong?

Warmest regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message