3 Replies Latest reply on Jun 21, 2011 1:40 PM by peterj

    .XLS opening problem in JBOSS

    mandeep

      Hi,

      I am facing a weird problem with my xls files when opened thru Jboss in IE.

      I have a JSP deployed on JBOSS 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 ANSI characters in IE instead of opening the xls file correctly.

      The code of my jsp is as follows:

      ***********************************************************
      <%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
      <html>
      <head>
      </head>
      <body>
      <h2>Testing File Links</h2>
      <hr/>
      <a href="49396.pdf" target="blank">49396.pdf</a>
      <br/>
      <a href="July2006.xls" target="blank">July2006.xls</a>
      </body>
      </html>
      ***********************************************************
      


      The same code works fine when run as a simple HTML outside JBOSS.

      Is there any remedy ??

      Regards,
      Mandeep Singh

        • 1. Re: .XLS opening problem in JBOSS
          peterj

          Try adding the following mime mapping:

          <mime-mapping>
           <extension>xls</extension>
           <mime-type>application/vnd.ms-excel</mime-type>
           </mime-mapping>


          to the mime mapping section of the server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml file and see if that helps.


          • 2. Re: .XLS opening problem in JBOSS
            duanxz

            Hi, Peter Johnson

             

            I have installed jboss-5.1.0.GA on solaris
            i am facing a weird problem with my msi files when opened thru Jboss in IE.

            I have a JSP deployed on JBOSS which has links to a msi file and a xls file.

            The xls file opens up normally when the link is clicked on, but when the msi link is clicked it displays some ANSI characters in IE instead of opening the xls file correctly.

            In my application WEB-INF/web.xml has increased over the string shown below:
            ****************************************************
            <mime-mapping>
            <extension>xls</extension>
            <mime-type>application/vnd.ms-excel</mime-type>
            </mime-mapping>
            <mime-mapping>
              <extension>cab</extension>
              <mime-type>application/x-cabinet</mime-type>
            </mime-mapping>
            <mime-mapping>
              <extension>msi</extension>
              <mime-type>application/octet-stream</mime-type>
            </mime-mapping>
            ***************************************************
            The code of my jsp is as follows:
            <%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
            <html>
            <head>
            </head>
            <body>
            <h2>Testing File Links</h2>
            <hr/>
            <a href="ax_install_x32.msi" target="blank">ax_install_x32.msi</a>
            <br/>
            <a href="1.xls" target="blank">1.xls</a>
            </body>
            </html>

             


            in jboss-5.1.0.GA there hasn't "server/default/deploy/jbossweb-tomcat55.sar/conf/web.xml",how can i do ??

             

            Best Regards,
            duanxz

            • 3. Re: .XLS opening problem in JBOSS
              peterj

              Please do not post the same question twice - it makes having a coherent conversation impossible. And resurrecting a 5 year old thread is never a good idea.

              http://community.jboss.org/message/611110#611110