Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple File Upload using Struts" Watch "Multiple File Upload using Struts" New topic
Author

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.

Thanks


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.

http://www.telio.be/blog/2006/01/06/ajax-upload-progress-monitor-for-commons-fileupload-example/
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 ?


Thankyou.

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

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.


TIA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple File Upload using Struts
 
Similar Threads
How can I upload a File using Struts
How to disable struts multipart parsing?
html:file
Struts2 multiple file upload using single file TAG
Multiple File Upload using Struts