This is the code snippet I am trying to run. It is working fine locally, but if I try to run it in a unix server, the name of the down loaded file is displayed as the url mapped to the servlet in the web.xml
instead of Report.xls
. Please help me…
response.reset();
response.setHeader("Expires", "0");
response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
response.setHeader("Pragma", "public");
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=Report.xls;");