views:

175

answers:

0

I am using org.apache.commons.fileUpload.FileItem and other related classes for uploading files from local machine to server (Although for the current testing both the machines are same).

I am having .jsp file as UI and servlet to handle the upload. Now when the request reaches statement

List items = upload.parseRequest(request);

it returns empty list. I googled this thing at many places. Most of them specifying the symptons that parserequest() returns empty. But Could not find out the exact solution to avoid this. At one place I could see that Tomcat may have filters that may have parsed The request and thats why at above call to parseRequest returns empty list. But there is no specification how to avoid this.

Is it because of the web server I am using (which is JBOss) ? or has it anything to do with the java version and commons.jar version conflicts ?

I am using

  • jre 1.6
  • jboss-4.0.4.CR2
  • commons-fileupload-1.2.2.jar
  • Eclipse (To create dynamic web project)

Your help would be very much useful.