This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Multiple File Upload using Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple File Upload using Struts" Watch "Multiple File Upload using Struts" New topic

Multiple File Upload using Struts

Ambika Jain
Ranch Hand

Joined: Jan 27, 2005
Posts: 48
I need to do a Multiple File Upload using Struts in my web app.
Its easy to do a single file upload using the FormFile.
But how do we implement for multiple file upload.

Any help will be appreciated.


Ambika Jain
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
"Multiple file upload" in that the user can select a fixed number of files, or that the user can select any number of files? In the first case where you the user can select a fixed number of files you just need to put multiple FormFile properties in your form. I recall doing some research into the second case and it is not supported. As I recall, some browsers will let the user select multiple files but it is not really a supported feature and not something supported by Struts.

- Brent
Daniel Conner
Ranch Hand

Joined: Jan 25, 2007
Posts: 47
I recently had been doing research on doing multiple file uploads. I did find this address. It isn't using struts. Take a look at it though. It still may be helpful.
Ambika Jain
Ranch Hand

Joined: Jan 27, 2005
Posts: 48
Thanks Daniel .

Your link is very helpful.
I am able to achive this using few changes in the ActionForm file.
Just wanted to know if this is right way of doing it ?


--merrill-- Added [ c o d e ] tags
[ January 26, 2007: Message edited by: Merrill Higginson ]
sarvananda sarvananda

Joined: Mar 20, 2007
Posts: 21
Hi Ambika,

Any update with how you went ahead with this ?
How are you processing this approach in the action class.
I am stuck in a similar position now.

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Multiple File Upload using Struts
It's not a secret anymore!