File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Upload multiple files in jsp

Shaik Vali
Greenhorn

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

I have a requirement to upload files.

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

UploadAction.java:
---------------------
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........

Thanks

David Newton
Author
Rancher

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: http://aspose.com/file-tools
 
subject: Upload multiple files in jsp