Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Downloading multiple files

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with LDAp login using jsp 6 116
spring AOP 6 88
lessBy10  challenge 15 95
instanceof  operator in java 26 95
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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