Nothing wrong I can see on your code, how are you getting the file from the client??
Javier
Main Topics
Browse All TopicsHi All,
I am writing a page from where a user can upload a zip file & my page will first validate the zip file & if it is valid then only it will be saved in actual folder. Please see my piece of code below, the problem i am getting is i am able to save the file in temp folder but when i try to read it for validation it gives this error :
java.util.zip.ZipException
at java.util.zip.ZipFile.open
at java.util.zip.ZipFile.<ini
at java.util.zip.ZipFile.<ini
Thanks in advance
-vijayneema
Here is my code :
FileOutputStream fileOutput = new FileOutputStream(tmpFileNa
FSRUtil.copy(is, fileOutput); // "is" is a inputStream object, this statement create the file in tmp folder.
fileOutput.close();
fileOutput = null;
File file = new File(tmpFileName);
ZipFile zip = new ZipFile(file); // i am getting error on this line.
Enumeration enum = zip.entries();
for(;enum.hasMoreElements(
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: kennethxuPosted on 2003-12-26 at 07:09:38ID: 10002085
Would you please close your OLD Qs: e.com/Web/ Web_Langua ges/JSP/ QH _649303.ht ml
http://www.experts-exchang
Thanks