Hi
I am trying to export data from my
JSP to an excel sheet.
I used the following code in my JSP.
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-
disposition", "attachment;filename=ExcelAdjustments.xls");
response.setHeader("Pragma", "public");
response.setHeader("Cache-Control", "max-age=0");
It is working fine sometimes but at times it throws the following error.
Error 500: HTTP/1.1 408 Connection timed out while reading request Server: WebSphere Application Server/5.1 Content-Type: text/html Content-Length: 142 Connection: close
If i remove this,
response.setHeader("Cache-Control", "max-age=0"), i am able to save the excel without any error but i am not able to directly open the excel without saving it.
My browser is IE 5
Please advice.
Thanks
Karthik