How to force downloading

Force Downloads


To get a browser to download a file with a different default name:

response.setHeader("Content-Disposition", "attachment;filename=myFile.txt");