[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - .xls is not opening properly in JBoss But the same code open
kalaiselvane
do-not-reply at jboss.com
Tue Dec 5 02:13:54 EST 2006
Hi,
I am facing a weird problem with my xls files when opened thru Jboss in IE 6.
I have a JSP deployed on JBOSS 4.0.4.CR2 which has links to a pdf file and a xls file.
The pdf file opens up normally when the link is clicked on, but when the xls link is clicked it displays some Binary characters in IE6 instead of opening the xls file correctly.
The code of my jsp is as follows:
Code:
***********************************************************
<%
response.setHeader("Pragma", "public");
response.setHeader("Cache-Control", "must-revalidate");
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","attachment; filename=July2006.xls");
%>
<h2>Testing File Links</h2>
49396.pdf
July2006.xls
***********************************************************
i have included the MIME Mapping in server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml
<mime-mapping>
xls
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
The same code works fine when run the application in WEBSPHERE but not in JBOSS.
anywhere i made wrong?? .. why is it so?....i dont know what to do.. i have tried a lot...please help me ... i m in dare need of the solution...
Regards,
kalai
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991194#3991194
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991194
More information about the jboss-user
mailing list