Originally posted by Adewale Adebusoye:
Hello:
i included the servlet response headers:
response.setHeader("Content-Type", "text/plain");
response.setHeader("Content-Disposition", "attachment; filename=file.txt"));
the only thing that its not downloading my attached file, rather, its set the filename to null, and its downloading the dynamic html generated by my servlet into a file.
So am i supposed to actually code for the download itself?
Please reply
Yes.
Fortunately, this is not too difficult:
Example: