I am generating a csv (comma separated value) file with Java Server Pages (JSP). The URL shows "my_generated_csv.jsp
".
What I want to do is simple: The user clicks "Generate
" which downloads the generated CSV
file. I'd like to generate it with the JSP. Do I need to rethink my approach?
Edit:
The following code works to make the file downloadable, but the extension remains the same. Does anyone know how to change it?
<% response.setContentType("text/csv"); %>