Downloading multiple files

Hello experts,

I have a JSP that lets users to check box multiple images and then save them to their local machine after clicking on a "submit" button. I am wondering what is the best way to handle it, right now my code can only download 1 file. I am trying to avoid having the user selecting the destination location for saving for every files checked. It would be great if the user select the location once, then all checked files will be saved there.

Right now, my code only works for 1 single (the first one), so only one file is stored now even the user checked 2.

Thanks

Stephen
autoknowledgeAsked:
Who is Participating?
 
TimYatesConnect With a Mentor Commented:
If you use a ZipOutputStream, you can read the files in one by one, and call addEntry() to add the files to a single zip file on the fly.  Then the user can unzip the file to get at the files they selected...

Other than this, I can't think of another way :-/

Sorry I can't post any code, this isn't my PC :-(

Good luck!!

Tim
0
 
autoknowledgeAuthor Commented:
Instead of making a zip file, is it possible to create a directory and in the loop I put all files in that directory and the user only need to select the saving location plus the directory name??

Stephen
0
 
TimYatesCommented:
no :-(
0
 
TimYatesCommented:
Well, you could, with a signed Java applet, or a signed ActiveX control, but with just HTML and JSP and browsers...no :-(
0
 
dhanyaknairCommented:
Hey Stephen/TimYates

I want the same thing.(JSP running in server that lets users to check box multiple images and then save them to their local machine after clicking on a "submit" button.)
Did you manage to acheive it?
Can you helpme out with some code?

Its urgent.

Regards,
Dhanya
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.