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]
Advertisement
Reply

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.