Sep 30th, 2008, 05:04 PM
commons-fileupload with Struts2 and Spring roblemsp
I am using struts2 and spring and am trying to implement a fileupload page.
I've included the config. below in my applicationContext.xml file.
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.C ommonsMultipartResolver">
<!-- one of the properties available; the maximum file size in bytes -->
<property name="maxUploadSize" value="100000" />
And am trying the following code
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List<FileItem> items = upload.parseRequest(request);
My problem is that items is alway empty.
I see that its because the sturts2 fileUpload intercepter seems to have already parsed the requeslt.
How would I go about solving this?
#Thanks in advance.