Szczepan Faber wrote the following on 1/17/2006 7:58 AM:

I made nice servlet (Struts action actually) that downloads xls (or
opens - depends what the users chooses).

headers:

response.setHeader("Content-Disposition", "attachment;
filename=report.xls");
response.setContentType("application/vnd.ms-excel");

Just for kicks, instead of doing it from an Action (or pure Servlet), forward to a JSP and set the response stuff up top:
<%
response.setContentType("application/vnd.ms-excel");
response.setHeader("Pragma", "");
response.setHeader("Cache-Control", "max-age=0");
%>

Also, make sure you have not external links to style sheets or images.

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to