tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: Excel Mime problem
Date Fri, 06 Feb 2004 10:02:14 GMT
I've just done this today! :) The following JSP boots up in Excel..you need to set the content
type before ANYTHING else happens with the output stream

<%
 response.setContentType("application/vnd.ms-excel");
 response.addHeader("Content-Disposition", "attachment;filename=myExcelTest.xls");
%>

1
5

ADC

-----Original Message-----
From: pavan.k@tcs.com [mailto:pavan.k@tcs.com]
Sent: 06 February 2004 09:54
To: Tomcat Users List
Subject: Excel Mime problem



hi there, 

iam using tomcat 5 version..i  have a requirement 
where my jsp will generate a excel sheet and places in the server directory.. 
but the problem is when i open the excel thru a java script from a browser window,i actually
get the 
excel in text format on the browser itself.. 

i tested the same excel sheet using a static html page,it opens in excel format within the

browser. 

are theere any specific mime type settings to be set..i already tried with application/vnd.ms-excel


any help is appreciated 

TIA
Pavan Kumar
Tata Consultancy Services
Mailto: pavan.k@tcs.com
Website: http://www.tcs.com


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com">www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message