java - Informing the user that the file is being generated in a download servlet -
i have download servlet wich generates zip files, 1 of them pretty big, , sends generated file in response download.
the problem generating process pretty big, , between step of generation of de zip , download step (when user see download dialog) many seconds or minute pass. inform user anyway file beeing generated.
the solution i´m thinking doing several requests, 1 open modal window informs user , inside this, request automatically action wich generates file in temp location , then, when request ends, 1 wich close window (the window must closed automatically) , request download servlet generated file in last step.
if understands i´m trying do, if exists better , cleaner solution.
you can fire ajax request start generation process, , other ajax requests poll server if file ready. if yes - change location of browser file. otherwise, show "loading" message/image/..
Comments
Post a Comment