• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to download multiple files using struts2

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Clapham
Sheriff
Posts: 21978
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!