You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Doug Chamberlin <ne...@andoversoftware.com> on 2003/09/16 18:45:03 UTC
Specifying content type for file downloads
I'm using Tomcat 4.06 standalone and cannot find how to configure the
server to properly identify downloaded files as Excel spreadsheets. I'm
using links which look like:
<a href="https://webserver.com\Info\Docs\4211/SomeSpreadsheet.xls">
<b>SomeSpreadsheet.xls</b><br>
</a>
When the user clicks on the link the file is being displayed in the user's
browser as garbage rather than having the browser display it via Excel.
I cannot find how to configure the server to properly identify these files
as Excel spreadsheets.
Doug Chamberlin
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Specifying content type for file downloads
Posted by Jon Wingfield <jo...@mkodo.com>.
Tomcat is serving the static resource using its default servlet?
If so, try adding the mime type to the conf/web.xml file:
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
Doug Chamberlin wrote:
> I'm using Tomcat 4.06 standalone and cannot find how to configure the
> server to properly identify downloaded files as Excel spreadsheets. I'm
> using links which look like:
>
> <a href="https://webserver.com\Info\Docs\4211/SomeSpreadsheet.xls">
> <b>SomeSpreadsheet.xls</b><br>
> </a>
>
> When the user clicks on the link the file is being displayed in the
> user's browser as garbage rather than having the browser display it via
> Excel.
>
> I cannot find how to configure the server to properly identify these
> files as Excel spreadsheets.
>
> Doug Chamberlin
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Specifying content type for file downloads
Posted by Jon Wingfield <jo...@mkodo.com>.
Tomcat is serving the static resource using its default servlet?
If so, try adding the mime type to the conf/web.xml file:
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
Doug Chamberlin wrote:
> I'm using Tomcat 4.06 standalone and cannot find how to configure the
> server to properly identify downloaded files as Excel spreadsheets. I'm
> using links which look like:
>
> <a href="https://webserver.com\Info\Docs\4211/SomeSpreadsheet.xls">
> <b>SomeSpreadsheet.xls</b><br>
> </a>
>
> When the user clicks on the link the file is being displayed in the
> user's browser as garbage rather than having the browser display it via
> Excel.
>
> I cannot find how to configure the server to properly identify these
> files as Excel spreadsheets.
>
> Doug Chamberlin
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>