Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: How to serve static EXCEL or POWERPOINT files from Tomcat ?

Reynir Hübner

2004-01-12

Replies:

Hi,

Just add a mime mapping into tomcat/conf/web.xml

<mime-mapping>
    <extension>xls</extension>
    <mime-type>application/msexcel</mime-type>
  </mime-mapping>
   <mime-mapping>
   <extension>ppt</extension>
   <mime-type>application/powerpnt</mime-type>
  </mime-mapping>

Restart tomcat...
And that should do the trick (done it many times).

Hope it helps
-reynir






> -----Original Message-----
> From: Enrique MARTIN [mailto:e.martin@(protected)]
> Sent: 12. janúar 2004 10:58
> To: tomcat-user@(protected)
> Subject: How to serve static EXCEL or POWERPOINT files from Tomcat ?
>
>
> Hi,
>
> I am trying to serve .xls and .ppt files from tomcat so that
> the browser
> opens the right application (excel and powerpoint
> respectively) . What I
> obtain instead is that the byte content is sent by the web
> server and this
> content is then interpreted as text by the browser.
> For the .doc files, on the other hand, I have the desired
> behavior: word
> opens.
>
> Does anybody know how to obtain from tomcat this behavior?
>
> Thanks,
> Enrique.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.