The moose likes Struts and the fly likes How to download multiple files using struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to download multiple files using struts2" Watch "How to download multiple files using struts2" New topic
Author

How to download multiple files using struts2

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
I want to have a form where user selects multiple zip files using checkbox and then clicks download button. Here I want to download all selected files. How to implement this? I can download single file using stream result type but I have no idea how to use stream result type to download multiple zip files with one user click.

Can anyone please guide me on this?


I am slow but sure
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19728
    
  10

You can't download more than one file in an HTTP response. That's a design feature of HTTP. And since Struts is sending out HTTP responses, you can't do that in Struts.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to download multiple files using struts2
 
It's not a secret anymore!