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
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.
I agree. Here's the link:
subject: Upload multiple files in jsp