abed asghari wrote:
Paul Clapham wrote: Abed, one suggestion: You are doing two things there, creating a zip archive and sending it as a servlet response. Either of those two things could be the source of your problem, conceivably. So I suggest testing them separately. In particular create the zip archive and write it to a file locally, in plain old Java code and not in a servlet. If that works then try sending the archive as a servlet response.
Dave Tolls wrote:Can you show your test code that successfully outputs to a local file?
Just so we can see whether there is some subtle difference.
Paul Clapham wrote:In your servlet code you're calling "zos.finish()" and in your local download code you aren't. I doubt that's the subtle difference that Dave was hoping for, though.
Can I suggest that now you have done a local download which is okay and a remote download which is corrupt, that you bring the two together and compare them to see what's different?
Dave Tolls wrote:Yeah, I was sort of hoping for something a bit more obvious...
One thing, though, can you give us the actual code for this line in your server code?
abed asghari wrote:Ron McLeod i checked zip file in server direction is correct but after download is corrupt
abed asghari wrote:i tested but not work ,
always in time unzip show message : "C:\Users\asghari\Downloads\MyZip.zip: Unexpected end of archive " and file in server directory is 60kB and after download is 56kB...
Don't get me started about those stupid light bulbs. |