How to waite for a file to be written in a godd way?
Hello!I wonder if any one got a good solution for this problem.
I got a servlet that boundles a couple of files and stores them into a zip-file.
When the zip-file is written to disk the servlet should display a link to the zip-file so the user is able to download it.
But my servlet is in a bit of a hurry, it displays the link before the zip-file exists.
So if any one could give a good solution for this it would be great.
Correct me if I'm wrong when I say that this looks bad:
//write the zip file
while(!zipFile.exits())
{
}
//Display the response
Best regards
Fredrik
