Hello,
I'm trying to write a download servlet that also refreshes the original JSP. When the user hits download, I show a download-in-progress graphic, so after the download is generated and the user is prompted to save the file, I want the JSP to refresh to remove the "loading" graphic.
I'm using:
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment; filename=\"myfile.xls\"");
OutputStream out = response.getOutputStream();
writeSpreadSheet(out);
out.flush();
out.close();
However, once I flush i can't send back a redirection or refresh header.
Can anyone suggest of a way to do this? Maybe I can use javascript to detect when the download is returned and put the other image back?
Maybe there is a way to do this in struts?
Any help would be appreciated.
Edited by: Arrowx7 on Sep 7, 2008 9:24 AM