| Author |
response.setheader("content-disposition") does not work in IE
|
Shreyaswini Kolali
Greenhorn
Joined: Aug 02, 2011
Posts: 3
|
|
Hi,
My piece of code is as follows where the file name is generated dynamicsally each time based on the users' input.
The code executes very well in Firefox & chrome. But in IE when i try to open the excel sheet that is exported, the name of the file remains same as the servelet name.
String excelName = Util.getExcelName(entityType, entityName, effectiveDate);
response.reset();
response.setContentType("application/x-download");
response.setHeader("Content-Disposition", "attachment; filename=" + excelName );
Can anyone please help me with this issue.? It is specific to only IE.
Thanks,
Shreya
|
 |
N Sahni
Ranch Hand
Joined: Jul 07, 2011
Posts: 55
|
|
Hi,
Which version of IE you are using. I think this issue is no longer visible in IE8 and later.
|
Thanks and Regards,
Nilesh Sahni | nsahni@infocepts.com | www.infocepts.com
|
 |
vipul bondugula
Ranch Hand
Joined: Oct 14, 2010
Posts: 218
|
|
Hi Shreyaswini,
response.setContentType("application/x-download");
Replace with this code
response.setContentType("application/vnd.ms-excel");.Once try this.May be this will be helpful for your scenario..
Cheers...
|
Thanks
Vipul Kumar
|
 |
 |
|
|
subject: response.setheader("content-disposition") does not work in IE
|
|
|