0 Replies Latest reply on Dec 5, 2006 2:13 AM by kalaiselvane

    .xls is not opening properly in JBoss But the same code open

    kalaiselvane

      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