• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with exporting data from JSP to excel sheet  RSS feed

Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to export data from my JSP to an excel sheet.
I used the following code in my JSP.

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.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!