File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Upload multiple files in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Upload multiple files in jsp" Watch "Upload multiple files in jsp" New topic

Upload multiple files in jsp

Shaik Vali

Joined: Feb 07, 2008
Posts: 22
Hi Guys Good Morning

I have a requirement to upload files.

<s:file name="image" accept="image/*" theme="simple" id="imageFile" value="%{imageUrl}"/>
<s:file name="icon" accept="image/*" theme="simple" id="iconFile" value="%{iconUrl}"/>
File image;
File icon;

and setters and getters. So based on the name I can able upload the files into different directories like icons will be icons folder , images will be into images folder.

Now the requirement is I need to upload a set of images & set of icons not sure the count.

Please help me out how to do this........


David Newton

Joined: Sep 29, 2008
Posts: 12617

Either add more <s:file> tags in the JSP or create HTML file input elements via JavaScript.
It is sorta covered in the JavaRanch Style Guide.
subject: Upload multiple files in jsp
Similar Threads
possible?? input type=file name=img_file
Downlaod in Strut2
struts 2 upload problem
Myfaces component is not rendered properly
Struts multiple file upload array index problem