I'm trying to upload multiple files using struts html:file tag. However, they all share one property name ("sourceFile"). So, I cannot read more than one file is my action class.
If you are using struts 2. Download struts. Check the struts2-showcase-2.0.6.war. It has an Action that handle multiple file uploads
SCJP1.4
Nina Anderson
Ranch Hand
Joined: Jul 18, 2006
Posts: 148
posted
0
Yes...but the problem I'm having is there is one property name for all the files. So, if there are 20 different html:file displayed on a page, all 20 of them will have the same name.
hi just make sure that each time a file is selected you make a call to you action class and put this selected file into a hashmap of Formfiles. Anytime you want to check the attached files just iterate through this hashmap. I have implemented such a scenario let me know if you need more details