Two Laptop Bag*
The moose likes Struts and the fly likes Downloading multiple files in one request 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 "Downloading multiple files in one request" Watch "Downloading multiple files in one request" New topic
Author

Downloading multiple files in one request

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi All,

I have a jsp where it displays a list of files to the user in a form of List Box. User will click multiple entries in the List Box where each entry corresponds to one File.

All my files are save into the database as BLOB files. Upon extracting the list of files that the user wants to download, I will look up at my database and get all the files then convert the BLOB files to proper format then forward it to the user.

But I am wondering if its possible in this way? I have looked in the net and found some good examples of file download but it contains only one file. Need some advice on this one or should i just abandon my thought.

Is it possible to download multiple files all in one request and save it all in the local directory of the users.? Thanks


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

The reason you can only find examples that download one file is: you can only download one file. Nothing to do with Struts, that's just how HTTP works.

You could zip all the user's selections into a single zip archive and download that, but the user might not thank you for that.
Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi Paul,

I did thought of zipping the file before downloading it to the client but as you have said, user might not thank me for that. Thanks for the help.
 
wood burning stoves
 
subject: Downloading multiple files in one request
 
Similar Threads
downloading a file. how can i set the file name?
Need Help for implementing save as dialog box for downloading a folder not a file
Downloading file from Oracle DB
Unable to view uploaded files in Tomcat till server is refreshed
Retrieve binary file from database and send to user via web browser