Problem on windows xp with downloaded zip file

Hi,
I have written a JSP to download file which is as follows
try
response.setContentType("application/download");
response.setHeader("Content-Disposition","attachment;filename=<FileName>");
int iRead;
FileInputStream stream = null;
try
File f = new File(<FilePath>);
stream = new FileInputStream(f);
while ((iRead = stream.read()) != -1)
out.write(iRead);
out.flush();
finally
if (stream != null)
stream.close();
catch(Exception e)
//out.println("Exception : "+e);
After downloading zip file, could not extract files on windows XP by using any tool or built-in extractor i.e. compressed(zipped)folders (error: compressed folder invalid or corrupted).
But this works on win2k or win98
How can i work with it or can anyone tell me a solution to handle such a problem.
Thanks in advance.
Rajesh
[email protected]

This could be a problem with the built-in ZIP program in Win XP - it's possible that the ZIP you are downloading (uploading?) is simply incompatible with the XP program. In Win 98 & 2000, you would have to use your own ZIP program, e.g. Winzip, and that can handle more formats that the XP program.
Try installing the same ZIP program that you have on w98/2k on your XP machine, and see if you can open the uploaded file using it.

Similar Messages

  • Problem downloading ZIP file with Squid-3.0

    Hi,
    I have upgraded my Linux CentOS squid proxy servers to Squid version 3.0. Since then I can not download the following file it just hangs :
    http://download.oracle.com/otn/java/sqldeveloper/sqldeveloper-1.5.5.59.69.zip
    I dont see any error in the squid logs or on my firewall.
    I can however download it on one of the older servers still running Squid version 2.6.
    It is just very strange as I can download ZIP files from any other website with the upgraded servers.
    Any ideas on what might cause this ?
    Thanks
    JHEFER
    Edited by: jhefer on Nov 19, 2009 12:15 AM

    If you have already interested, I found the solution. The problem is that oracle website (and probably others) uses “Vary” field in the header and squid doesn’t support this (by default). You have to download squid sources on http://www.squid-cache.org/Versions/ and compile these with “--enable-http-violations” parameter :
    *./configure ‘--enable-http-violations’ ‘…’ ‘…’*
    make all
    make install
    I hope this solution will be very useful to you.
    Laurent

  • I can not do the update , what should I do to fix this error ? "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    I can not do the update , what should I do to fix this error ?
    "There was a problem with downloading the file . For tips on troubleshooting , please go to Customer Support . ( Error code : 204 ) ." thanks

    Hi,
    Please refer to the help document below:
    Error downloading, installing, or updating Creative Cloud applications
    Regards,
    Sheena

  • Problem with attached zip file

    I received an email with a zip file attached, but whenever I try to open it I get the message "Unable to unarchive "filename.zip: into "Desktop." (Error 1 - Operation not permitted)"
    Can anyone help?

    Download Stuffit Expander which can open just about anything you throw at it. You can obtain this "free" utility from Versiontracker and Macupdate.

  • When i download zip files it says decompression failed

    when i download zip files on some occasions i get decompression failed

    The current version of the built-in Archive Utility has problems with some zip files. Use "The Unarchiver" instead -- free in the App Store.

  • How do I get a download zip file from firefox to my desktop

    I download zip files from different web sites and they go to the download folder in firefox, but I can't access them to open,unzip, or work with them on my computer offline. How can I move them from the download folder in firefox to my computer desktop?

    Hi,
    In order to open ZIP files, you have to download an app to enable the opening of the ZIP. Here's one you can use: https://play.google.com/store/apps/details?id=com.winzip.android
    Next, when you install that, open it and go to your Download directory. It should either be in sdcard0, sdcard, or sdcard1, then go to Download.
    Once you find it, touch and hold the file, then click '''Unzip here''' and it will extract the files in the ZIP folder.
    Let me know if this works!

  • Reader 9.0 on Vista associates itself with my .zip files ?!?!

    System: a Brand NEW (as in 3 days old) Vista machine (3 gig, dual core).
    When I install Adobe Reader, the first time, my .zip files are okay - I can use the built-in uncompress feature to open them. If I shut down and come back the next day, Reader is now associated with my .zip files so I can't open them. The only way is to uninstall reader. I don't want to have to keep uninstalling/reinstalling each time I need to either open a .zip file (which I do frequently) or read a .pdf file.
    I don't know what microsoft program to associate them with so I can unassociate the .zip files with Reader and use the built in uncompress command to open the .zip files. (I did find where to set file associations in Vista.)
    Can someone here help me?
    Thanks,
    Trish

    Okay,
    I found a "fix".
    To help others - there is a registry fix you can run - see this page:
    http://www.winhelponline.com/articles/105/1/File-association-fixes-for-Windows-Vista.html
    Follow the instructions on that page, and it does seem to fix it.
    Just note, the icon associated with the zip file may remain Adobe Reader, but if you right click, "Extract All" *will* show up on the list. (Extract All was *not* on the list when I booted up.)
    Vista is giving me a headache!
    -Trish

  • I use javaFx WebViewBrowser to download ZIP file, the page no action

    I use javaFx WebViewBrowser to download ZIP file, the page no action; other tools example chrome ,ie can download the zip file .
    so can you writer a download zip file example for me ?
    thanks ,my english is so bad ,sorry !!! :)

    WebView doesn't have a built in file downloader - you have to implement it yourself.
    You can find a sample implementation for file downloads in JavaFX here =>
    http://www.zenjava.com/2011/11/14/file-downloading-in-javafx-2-0-over-http/
    That sample does not include the hooks into WebView to trigger the downloads.
    You will need to trigger off the mime type or the file extension in the url.
    A rudimentary sample trigger a download off of webview is provided in the code below.
    For a nice solution, you would probably want to spin the downloader off with it's own UI similar and manage the download itself as a JavaFX Task similar to how the zenjava component works.
    Code adapted from => http://code.google.com/p/willow-browser/source/browse/src/main/java/org/jewelsea/willow/BrowserWindow.java
    // monitor the location url, and if it is a pdf file, then create a pdf viewer for it, if it is downloadable, then download it.
    view.getEngine().locationProperty().addListener(new ChangeListener<String>() {
      @Override public void changed(ObservableValue<? extends String> observableValue, String oldLoc, String newLoc) {
        if (newLoc.endsWith(".pdf")) {
          try {
            final PDFViewer pdfViewer = new PDFViewer(false);  // todo try icepdf viewer instead...
            pdfViewer.openFile(new URL(newLoc));
          } catch (Exception ex) {
            // just fail to open a bad pdf url silently - no action required.
        String downloadableExtension = null;  // todo I wonder how to find out from WebView which documents it could not process so that I could trigger a save as for them?
        String[] downloadableExtensions = { ".doc", ".xls", ".zip", ".tgz", ".jar" };
        for (String ext: downloadableExtensions) {
          if (newLoc.endsWith(ext)) {
            downloadableExtension = ext;
            break;
        if (downloadableExtension != null) { 
          // create a file save option for performing a download.
          FileChooser chooser = new FileChooser();
          chooser.setTitle("Save " + newLoc);
          chooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Downloadable File", downloadableExtension));
          int filenameIdx = newLoc.lastIndexOf("/") + 1;
          if (filenameIdx != 0) {
            File saveFile = chooser.showSaveDialog(view.getScene().getWindow());
            if (saveFile != null) {
              BufferedInputStream  is = null;
              BufferedOutputStream os = null;
              try {
                is = new BufferedInputStream(new URL(newLoc).openStream());
                os = new BufferedOutputStream(new FileOutputStream(saveFile));
                int b = is.read();
                while (b != -1) {
                  os.write(b);
                  b = is.read();
              } catch (FileNotFoundException e) {
                System.out.println("Unable to save file: " + e);
              } catch (MalformedURLException e) {
                System.out.println("Unable to save file: " + e);
              } catch (IOException e) {
                System.out.println("Unable to save file: " + e);
              } finally {
                try { if (is != null) is.close(); } catch (IOException e) { /** no action required. */ }
                try { if (os != null) os.close(); } catch (IOException e) { /** no action required. */ }
            // todo provide feedback on the save function and provide a download list and download list lookup.
    });

  • Can't download .zip files

    When downloading from file sharing sites, I can't download .zip files. Downloading other compressed files such as .rar is automatic upon clicking on the file. How do I change the settings to include .zip files. Thanks

    Below is a link I uploaded myself. It is a few random songs I zipped and uploaded to the file sharing service Hotfile. When I attempt to go to the link myself, safari will not open the page and it also will not auto download the file as it does with other compressed files such as .rar. If I compress the file in .rar format or simply upload an MP3 to Hotfile or Rapidshare, I can click on the link and it automatically downloads.
    Link http://hotfile.com/dl/48619201/97e4208/Archive_2.zip.html

  • How to create a Web Dynpro Project from Downloaded zip file?

    Hi,
    I have been working in Java Web Dynpro for last 1 month but not able
    to create any Web Dynpro from Downloaded zip file?
    Can anybody tell me how to create a Java Web Dynpro Project from
    Donloaded zip code?
    Regards
    Kaushik Banerjee

    Hi Kaushik,
    You can add the existing zip file into your workspace by the following way -
    First open the NWDS and create a new project by clicking file -> new -> Project -> Simple -> Project
    and then File -> Import -> zipfile and then browse the zip file into the newly created project.
    or else you can also unzip the zip file into a folder and then Use the option of Import an exisitng project into workspace. You can find this in the File-> import -> Existing project into workspace. and then use the Browse option to browse to the existing folder.
    After importing the project you need to rebuild the project
    Regards,
    Raju Bonagiri.

  • I am unable to download zip files

    http://avl1.teltonika.lt/Downloads.FM22
    I am unable to download zip files from this URL

    Thanks, I just needed to update (not to reset).

  • Cant download zip.files

    Hi there,
    I cant download .zip files or software updates from any site and Ive tried several browsers.
    It just opens a new page and remains blank? or does nothing.
    I have no firewall on. And have no anti virus software.
    I can click on pdfs and they download fine.
    I using a new intel imac.
    Safari, firefox.
    Hope you can help, thanks.

    Fixed it, it was a program called speed downlod, i removed it and now i can download files, yay!
    speed downloader....more like Stop downloader

  • Can't expand downloaded zip-files

    I download zip files and can't expand them. If I compress my own files, they are easily expanded. The error message reads: Unable to unarchive "document.zip" into "Desktop". (Error 1 - Operation not permitted.)
    I have tried to create a folder and drop the zipped file there and expand it. Checked permission, which are read & write.
    Any suggestions?

    Sorry, I just don't know for sure as I never use the archive function.
    As most of my stuff is either graphics or movies I have a deep mistrust of anything that might affect quality!

  • Macbook Pro won't download .zip files correctly

    I have a Macbook Pro (13'' June 2012 model, 500GB HDD, 4GB RAM, 2.5GHz i5 processor, OS X 10.9.5) and whenever I try and download .zip files, on either Chrome or Safari, it doesn't know what size the file actually is meant to be (as seen below) and so keeps downloading constantly. Each time I cancel it (in some cases after it's reached over 100MB even though the file is a 9 song album), I get no files back out. Is there anyway to fix this so I can actually download them?

    Download Stuffit Expander from the App Store or directly from the manufacturer.  The software is free.  It can open any file you throw at it - after you set up its preferences to do so.

  • Problems with CRC in some windows app's whit zip files generated with Java

    Hello,
    That is very strange but, we have an app for compressing a folder into a zip. For making, we use the Java.Util.Zip API. Our zip file looks fine, we can unzip the files into another folder without problems, even we can open the file with Winzip or Winrar.
    But, we had encountered problems with anothers win apps like "Recovery ToolBox", or another win app built with the "Dynazip.dll" library. This apps give us the next error.
    "Bad Crc".
    But if we unzip this "corrupt" file and we zip the content again, all work without errors.
    [http://img297.imageshack.us/i/dibujoou.jpg/]
    Our code (this function only zips a single file):
        public static File zipFile(String sFile, String sNameFileIn, String sFileOut)
                throws IOException {
            File file = new File(sFile);
            FileOutputStream out = new FileOutputStream(sFileOut);
            FileInputStream fin = new FileInputStream(file);
            byte[] fileContent = new byte[(int) file.length()];
            fin.read(fileContent);
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            ZipOutputStream zout = new ZipOutputStream(bout);
            ZipEntry zipEntry = new ZipEntry(sNameFileIn);
            zout.putNextEntry(zipEntry);
            zout.write(fileContent, 0, fileContent.length);
            zout.closeEntry();
            zout.finish();
            zout.flush();
            zout.close();
            out.write(bout.toByteArray());
            out.flush();
            out.close();
            File fich = new File(sFileOut);
            fin.close();
            return fich;
        }I try to calculate the crc number for my own without success... I don't know what's happening
    Thanks in advance

    FileOutputStream out = new FileOutputStream(sFileOut);ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(sFileOut));
    byte[] fileContent = new byte[(int) file.length()];Here you are assuming the file size is <= Integer.MAX_VALUE. What if it isn't? Remove.
    fin.read(fileContent);Here you are assuming you filled the buffer. There is nothing in the API specification to warrant that assumption. Remove. See below.
    ByteArrayOutputStream bout = new ByteArrayOutputStream();
    ZipOutputStream zout = new ZipOutputStream(bout);Remove.
    ZipEntry zipEntry = new ZipEntry(sNameFileIn);
    zout.putNextEntry(zipEntry);Correct.
    zout.write(fileContent, 0, fileContent.length);int count;
    byte[] buffer = new byte[8192];
    while ((count = fin.read(buffer)) > 0)
    zout.write(buffer, 0, count);
    zout.closeEntry();Correct.
    zout.finish();
    zout.flush();Redundant but not incorrect.
    zout.close();Correct.
    out.write(bout.toByteArray());
    out.flush();
    out.close();Remove.
    File fich = new File(sFileOut);
    fin.close();
    return fich;I don't know why this method returns a File constructed out of one of its own arguments, which the caller could equally well do for himself, otherwise OK.

Maybe you are looking for