Solved

Downloading multiple files

Posted on 2004-03-22
5
315 Views
Last Modified: 2010-04-01
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
0
Comment
Question by:autoknowledge
  • 3
5 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 100 total points
ID: 10652131
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
 

Author Comment

by:autoknowledge
ID: 10652334
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
 
LVL 35

Expert Comment

by:TimYates
ID: 10652805
no :-(
0
 
LVL 35

Expert Comment

by:TimYates
ID: 10652812
Well, you could, with a signed Java applet, or a signed ActiveX control, but with just HTML and JSP and browsers...no :-(
0
 

Expert Comment

by:dhanyaknair
ID: 10831576
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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now