0

I wanted to download an Excel from the .jsp file in my application. I have added the following lines to all my JSP's:

<%@ page contentType="application/vnd.ms-excel" %>   
response.setHeader("Pragma", "No-cache");  
response.setHeader("Cache-Control", "no-cache");  
response.setDateHeader("Expires", 0);

I am able to download now but, in some pages I am able to see the size while downloading and in some not able to. I want all the pages with the size.

Can anyone please help me?

Andrea
  • 11,801
  • 17
  • 65
  • 72
anusha
  • 1
  • Are you setting the [Content-Length](http://stackoverflow.com/questions/2773396/whats-the-content-length-field-in-http-header) header? – Tap Sep 21 '15 at 13:40
  • i didnt set any content-length. – anusha Sep 22 '15 at 08:36
  • But the thing that i am worrying about was. i am using that jsp for printing the details in table of different regions. For some regions the size was displaying( in which the table size was small) and for others not coming. – anusha Sep 22 '15 at 08:38

0 Answers0