I am having two choices in my
jsp which allows me to choose a CSV or a PDF to download. I have the files in the respective format on the disk.
I want to put only the required format in the content type so that i can recognize the file while downloading.
If i give response.setContentType("application/pdf");
it works fine for the pdf
but if i set the response.setContentType("application/csv");
it doesn't identify it as a csv file.
WHERE DOES THE PROBLEM LIE?