Skip to content

Instantly share code, notes, and snippets.

@toamitkumar
Created March 12, 2012 00:19
Show Gist options
  • Save toamitkumar/2018815 to your computer and use it in GitHub Desktop.
Save toamitkumar/2018815 to your computer and use it in GitHub Desktop.
/*
* The code on the server side has content disposition as attachment
* It adds a cookie for the filedownload status
* remember to flush the response
*/
response.setHeader("Content-Disposition", "attachment; filename="+downloadFileName);
Cookie cookie = new Cookie("fileDownloadStatus", "complete");
cookie.setPath("/");
response.addCookie(cookie);
response.flushBuffer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment