Download Multiple Files?? (Servlets/Jsp)

Hello Forum Members,
I need to download multiple files from Server on a single click of button thats says "download". Using Servlets/Jsp only( I don't want to use applets/or Zip the files).
The scenario would be on the browser I will have 'n' number of checkboxes each corresponding to a file and there is a button that say's download. Once I click "download" the browser should prompt me to save in a directory.

I don't know if there's a Java implementation already out there (i'm sure there must be), but I think you'd need a separate Download Manager to be able to handle multiple file downloads. I'm all but positive that the standard download isn't gonna cut it, especially if the user selects a whole bunch of files. I don't think the built in download function allows for more than one file to download at a time, so unless you want a whole bunch of download windows all going at once, you'll need to either find (or implement) something that can.

Similar Messages

  • Download multiple files in one step

    Hi,
    my first try with acrobat.com with uploading some pictures which I like to share with friends led me to the question, how they can download my 18 pictures in one step. I put them in a workspace and gave them access. You can mark all files, but there is no menu point which offers you to download all files in one step.
    Is there a way to do this in one step?
    Greetings
    Mario

    Hello Mario,
    Thank you for posting. Unfortunately, there is currently no way to download multiple files at once; this functionality is high on our list of planned enhancements, so I encourage you to stay tuned for future releases.
    Best regards,
    Rebecca

  • Aria2 does not download multiple files at a time

    I'm trying to speed up my system upgrades by using aria2, but it won't speed up anything as it does not download multiple files at a time.
    As per this wiki post, https://wiki.archlinux.org/index.php/Im … erformance , "using aria2", I've installed aria2 and added the line
    XferCommand = /usr/bin/aria2c --allow-overwrite=true -c --file-allocation=none --log-level=error \
    -m2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf \
    --remote-time=true --summary-interval=60 -t5 -d / -o %o %u
    to the options section in pacman.conf. Pacman still works, but it isn't sped up. When pacman -Syu'ing, a normal line shows:
    #1 SIZE:1.3MiB/2.0MiB(63%) CN:1 SPD:50.0KiBs ETA:15s
    What's going on?
    P.S. I use the line reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist before doing a system upgrade.
    Last edited by bruno321 (2011-05-15 15:27:45)

    Using aria2c will download files over 5MB with multiple connections but will not download multiple files at the same time. Pacman calls aria2c with the first url, waits for it to finish, then calls aria2c with the second etc...
    If you want to download multiple packages simultaneously, see http://xyne.archlinux.ca/projects/pacman2aria2/

  • Download multiple files with 1 HttpURLConnection

    Hi,
    We have an application that downloads small text files (< 2 Kb) from a webserver. These files are downloaded 1 by 1 when needed. We open a HttpURLConnection, download 1 file and close the connection immediately afterwards. This is done for each file and hence produces a significant overhead.
    For performance reasons (both client and server side), we would like to open a connection to the webserver once, download a number of files and then close the connection.
    Currently, our code roughly looks like:
    InputStream is;
    HttpURLConnection con;
    int resp;
    try {
        URL url = new URL(location);
        con = (HttpURLConnection)url.openConnection();
        resp=con.getResponseCode();
        if(resp==HttpURLConnection.HTTP_OK) {
            is = con.getInputStream();
            // ... read data from the InputStream
            is.close();
    } catch (MalformedURLException murle) {
        murle.printStackTrace();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }Is it even possible to download multiple files from a web server using a HttpURLConnection? If so, how? :-)
    Please note that the solution should be compliant with J2SE 1.1, since we are writing an MHP application!
    Thanks in advance...

    Seerix,
    You might be able to fudge the settings of the URL class :
    Class URLStreamHandler
    Method protected void setURL
    Sets the fields of the URL argument to the indicated values. Only classes derived from URLStreamHandler are supposed to be able to call the set method on a URL.
    But this is not the best way, as URLs are supposed to be constant.
    Your alternative, is to create a Socket, deal with the protocol requirements
    (i.e. HTTP GET, POST and so on) then you can request any number files
    on that same connection. The only thing that this saves is connection build up and tear down.
    You could also multi-thread your original code ....... Although that might
    only save you some network transit time.
    -Cludge

  • OSD: Downloading multiple files is very slow

    I has a exe software. It is not a single file package, it contains a lot of files. when I installed this software in OSD, I found it would spend 15~20minutes to download files.
    It was very strange. The software is only 750 mb size. the speed of downloading 6 GB OS image is also much faster than this software.
    I know downloading multiple files is slower than downloading a single file, if their size are same.
    But the downloading of multiple files in OSD is "really" very slow.
    Why?  Cause of BITS or RDC?  How to fix it?
    PS:I update to SCCM 2012 R2 with CU1,  add the below into SCCM
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP]
    "RamDiskTFTPBlockSize"=dword:00004000
    http://windowsdeployments.net/how-to-speed-up-pxe-boot-in-wds-and-sccm/
    Now, the download speed up to 4 minutes, but it still slower than the normal copy & paste. 
    Test result:
    OSD: 2.6G
    single image, 2 minutes
    OSD: 750m multiple files, 4 mintues
    after OSD, copy & paste from network drive, 750 multiple files, 1 mintue

    I had updated to CU1 and add this into regedit . It is quicker than before, but it still slower than the normal.
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP]
    "RamDiskTFTPBlockSize"=dword:00004000
    http://windowsdeployments.net/how-to-speed-up-pxe-boot-in-wds-and-sccm/
    Download 2.63 G OS image:
    2min
    Download 750 M multiple
    files 4min

  • Is it possible to download multiple files as zip from Amazone S3 directly

    We need to download multiple files from Amazone S3 at a time in a zipped format. We use flex 3 and coldfusion 8 for development.

    Of course it is. Try it. Or, asked differently, what did you try that did not work?

  • Is it possible to download multiple files from FTP

    Hi,
    Is it possible to download the multiple zip files from FTP.I need to download multiple files from FTP into temporary folder in my local machine. Please help me.
    Regards,
    ahamad

    Of course it is. Try it. Or, asked differently, what did you try that did not work?

  • Download multiple files

    hi,all
    downloading files from server has been discussed for many times, i have known how to download one file after reading some older topics,but now i want to download
    multiple files,and I want browser prompt "Save As" only one time, then all the files would be downloaded to the same location,can anybody give me some advice?
    thanks & regards

    Hi,
    I don't think it sounds like what you're tyring to do would be possible for security reasons. I'd be quite worried if a browser was allowed to save multiple files after only asking once.
    I guess one solution would be to zip all the files up into one zip file (see JavaDocs for java.util.zip) and then transfer this zip file (this would also probably help with download times). This may not be the ideal solution for you though.

  • How can I download multiple files simultaneously? e.g. 6 files

    When I attempt to download multiple files (say 5 in number), the Mozilla allows only two files too be downloaded simultaneously. I wanted to change the option of downloading six files together but did not find the feature that could do so. Can you please kindly help or there is no such feature in Mozilla?

    There is a hidden preference for this. Check out this article: [http://kb.mozillazine.org/Network.http.max-persistent-connections-per-server Network.http.max-persistent-connections-per-server - MozillaZine Knowledge Base]
    If you haven't changed Firefox settings through about:config before, I recommend backing up your Firefox settings in case something goes wrong. See [https://support.mozilla.com/en-US/kb/Backing+up+your+information Backing up your information]. (You can copy your entire Firefox profile folder somewhere outside of the Mozilla folder.)

  • Downloading a file in JSP & Servlet

    Hi all
    I want to download a file from a server to the local machine using JSP.
    Kindly send me solution on this if any body has any info on this.
    Also is it possible to download a file from a server to the local machine using servlets.
    Do send me the soluton as soon as possible.
    Rgds,
    Satya

    http://www.jguru.com/faq/view.jsp?EID=10646

  • Downloading a file via JSP

    I am trying to write some code which will generate a file and then download the file
    from my Webserver. When I download the file I get "Error 500: OutputStream already obtained"
    appended to the file. I can't work out why this is so.
    Here is the code I have used to download the file.
    I have also included the file before and after transmission.
    Any help would be appreciated.
    <%@page import="java.net.*,javax.servlet.http.*,javax.servlet.*,java.io.*" %>
    <%
    ServletOutputStream out1 = response.getOutputStream();
    String fileName = (String)request.getParameter("filename");
    // MIME type for pdf doc
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition","attachment;filename="+fileName+";");
    File f = new File("\\"+fileName);
    FileInputStream stream = new FileInputStream(f);
    BufferedInputStream bis = new BufferedInputStream(stream);
    BufferedOutputStream bos = new BufferedOutputStream(out1);
    byte[] buff = new byte[2048];
    int bytesRead;
    // Simple read/write loop.
    try {
    while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
    bos.write(buff, 0, bytesRead);
    } catch (Exception e) {
    if (bos != null) bos.close();
    e.printStackTrace();     
    finally {
    if (bis != null) bis.close();
    if (bos != null) bos.close();     
    if (stream != null) stream.close();     
    %>
    This is the file on the WebServer
    The Quick Brown Fox Jumps Over The Lazy Dog
    The Quick Brown Fox Jumps Over The Lazy Dog
    The Quick Brown Fox Jumps Over The Lazy Dog
    This is the file after it has been transferred
    The Quick Brown Fox Jumps Over The Lazy Dog
    The Quick Brown Fox Jumps Over The Lazy Dog
    The Quick Brown Fox Jumps Over The Lazy DogError 500: OutputStream already obtained
    Thanks
    Adrian Campbell
    Honda Australia

    The JSP automatically gets an outputstream/writer, and starts writing to the output. In fact thats where the implicit variable "out" comes from.
    Couple of things to be aware of:
    Every carriage return outside of a <% %> tag in a JSP gets converted directly into the html as out.println("\r\n");
    That means the generated servlet has started writing even before you get the outputstream - which is what raises the exception.
    There are two ways to stop this
    1 - write it in a servlet - its purely code, with no HTML so servlet is better suited.
    2 - have no carriage returns outside of JSP tags <% %>. You currently have one - one the very first line. Try it like this:
    <%@page import="java.net.*,javax.servlet.http.*,javax.servlet.*,java.io.*" %><% 
    ServletOutputStream out1 = response.getOutputStream();
    %>  // and no carriage return at the end eitherThat should do it.
    As an aside, if you are going to be generating a text file, then you can use the implicit writer "out" as opposed to the OutputStream.
    Cheers,
    evnafets

  • How to download multiple files from Creative Cloud

    I uploaded about 30 photos to creative cloud storage. Now I cannot find a way to download a group or all at the same time. You can select multiples and move to different folders within CC, but can't download multiples. Had I known this before using it, I would have made a zip folder of images. It seems a bit clunky if this is true.

    [email protected]
    Thanks for the info. As a professional user, more functionality in the storage would be helpful. Right now I'm using other file transfer and storage soulutions that are far superior.
    I think most Cloud users would very much agree with you.
    The Cloud today is a reasonable version 1 product but it's clunky, lacks fundamental features and is a latecomer to a rapidly maturing market. Other offerings currently shine in comparison.
    Our expectations as consumers are very high because we're used to the Dropboxes (and other superior 3rd party solutions) out there.
    Adobe has been inundated with feature suggestions and enhancements from users. The more, the better.
    They might, as they claim, be working on improvements but they've got to get a move on before the Cloud tarnishes its own reputation too much due to lack of (expected) features.
    [email protected] wrote:
    By the way, the links in your post did not lead anywhere.
    The Jive forum software used by Adobe is creating bad links.
    Correct links are:
    Three things I'd like to see...
    http://forums.adobe.com/ideas/1789
    Three ideas: folder sharing, branded channel, e-mail notification
    http://forums.adobe.com/ideas/1706
    Share folders and branded channel?
    http://forums.adobe.com/ideas/1701

  • Downloading multiple files from a site with single request?

    Interesting Scenario:
    User clicks on check boxes indicating which files they want to download from a site, then clicks a "Download" button. Is there a way (other than ZIPPING them) to download each file individually to the directory they specify?
    We have a reason for wanting individual files, instead of one lumped ZIP.
    We use Java for our appserver and JSPs for our pages.

    User clicks on check boxes indicating which files
    they want to download from a site, then clicks a
    "Download" button. Is there a way (other than
    ZIPPING them) to download each file individually to
    the directory they specify?I would think the answer is "no", since HTTP is request, response (1 response) and don't know how you'd get that one response to be "here are 2 files for the user to save to one directory".

  • Downloading image using servlet/jsp

    Has anyone tried downloading a .gif image using servlet/jsp ??!?

    Yes, there's even an example in my book about servlets.

  • How to download multiple files?

    I have an air app where a user can click a thumbnail and download that file to their download folder.
    My question is how to go about allowing the user to select more than one and download them instead of one at a time.
    Do i need to just put the download in a loop? Also My custom item renderer and stopped the tiles from looking like they are selected, how would i make them look selected?

    try this
    private function downloadFile(url:String):void{
                var urlStream:URLStream = new URLStream();
                   var request:URLRequest = new URLRequest(url);
                downloadFileName=getDownloadFilename(url);
                      urlStream.addEventListener(Event.COMPLETE, writeFile);
                      urlStream.addEventListener(IOErrorEvent.IO_ERROR , function (e:IOErrorEvent):void{
                      urlStream.load(request);
                urlStream.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
         private function getDownloadFilename(URL:String):String{
                return(URL.substring(URL.lastIndexOf("/"),URL.length));
            private function onIOError (e:IOErrorEvent):void
                trace("An Error Occured and it looked like this.", e.text);
             private function writeFile(event:Event):void { 
                 var fileStream:FileStream = new FileStream(); 
                 var file:File=//perfered filename with location              
                fileStream.open(file, FileMode.WRITE);     
                 var dataBuffer:ByteArray = new ByteArray(); 
                event.target.readBytes(dataBuffer, 0, event.target.bytesAvailable); 
                fileStream.writeBytes(dataBuffer, 0, dataBuffer.length); 
                 fileStream.close(); 
                event.target.close(); 
                downloadFile(NEXT_ONE); 

Maybe you are looking for