This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 Multiple File Download 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 "Struts 2 Multiple File Download" Watch "Struts 2 Multiple File Download" New topic

Struts 2 Multiple File Download

Glen Divers
Ranch Hand

Joined: Jan 21, 2010
Posts: 61

I've successfully implemented a single file download using the Stream result. How do I deal with the situation where I have multiple files to download? I want to allow the user to select a number of files and then download all the chosen files, rather than force the user to select a file, download it, select another file, download it etc etc.

Joe Ess

Joined: Oct 29, 2001
Posts: 8836

HTTP is a single request- single response protocol. Your options are to either force your user to click multiple times, or make some server-side functionality to put multiple files in an archive file and return that as the response.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Struts 2 Multiple File Download
Similar Threads
Multiple File Upload using Struts
Selecting a Folder for Save As
Creating one excel from from multiple excel files
Downloading a multiple file from server
How to download multiple files using struts2