Solved

Downloading multiple files

Posted on 2004-03-22
5
319 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
password protect pdf 11 76
Help with LDAp login using jsp 6 113
maven project in eclipse 11 59
Set up Wildfly 10 8 392
One of the biggest threats facing all high-value targets are APT's.  These threats include sophisticated tactics that "often starts with mapping human organization and collecting intelligence on employees, who are nowadays a weaker link than network…
An article on effective troubleshooting
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

786 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