BES and MS Excel

Discussions

Web tier: servlets, JSP, Web frameworks: BES and MS Excel

  1. BES and MS Excel (3 messages)

    Hi

    I am trying to host a page using Borland Enterprise Server(BES). This page contains a link to an "Excel" file on the server. However, the so called "Excel" file on the server is actually a file containing HTML Table tags named as .xls file. Please refer to the below for example. Each time a user click on the link, the web browser is not using MS Excel to open the “Excel” file. It is displaying the file as a HTML page. This is not my desire result. I wanted the web browser to open up the file using MS Excel.

    How can this be achieved? I do not wish to change the file into a JSP with contentType="application/vnd.ms-excel".

    Is there a way to “cheat” BES into believing that the file is actually an Excel file and make MS Excel open it?

    Many Thanks



    <html>
    <head>
    <title>Report</title>
    </head>
    <body>

    <table>
    <tr>
    <th>BoxNo</th>
    <th>ContactName</th>
    <th>DivisionID</th>
    <th>CostCentreID</th>
    <th>DestructionDate</th>
    <th>DateArchived</th>
    <th>Status</th>
    <th>ContactExtension</th>
    <th>BoxNo</th>
    <th>FileReference</th>
    <th>ContentsDesc</th>
    <th>DatedFrom</th>
    <tr>
    <td>89475</td>
    <td>Jackie Bacon</td>
    <td>2</td>
    <td>21953</td>
    <td>2006-09-30 00:00:00.0</td>
    <td>1999-10-11 00:00:00.0</td>
    <td>0</td>
    <td>30340</td>
    <td>89475</td>
    <td>001</td>
    <td>Board Papers, Correspond. Speeches, Meetings</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </body>
    </html>

    Threaded Messages (3)

  2. BES and MS Excel[ Go to top ]

    are you using the Apache 2 with IIOP connected to the tomcat server ?

    if not then you maybe you have to add the mime type to the tomcat config files not sure where they are thou
  3. BES and MS Excel[ Go to top ]

    I added in the following enter to the web.xml. However, it is still displaying the 'Excel' file as a HTML

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

    Help. Anyone?

    Thanks
  4. BES and MS Excel[ Go to top ]

    I got it. There was a mistake in the tag. The below should be the correct codes.

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