You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by alla winter <al...@gmail.com> on 2007/10/15 18:46:27 UTC

href to .xls file shows raw file

I would appreciate if you would give me a hint, what should I do to make
browser to display excell spread sheet when href to .xls file is selected?
It displays the raw file insted.

<a href="/cobra_source/beneficiary_template.xls"
target="_blank">Excel template </a>

P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12

thanks for your help

Re: href to .xls file shows raw file

Posted by Pid <p...@pidster.com>.
David Delbecq wrote:
> alla winter a écrit :
>> I would appreciate if you would give me a hint, what should I do to make
>> browser to display excell spread sheet when href to .xls file is
>> selected?
>> It displays the raw file insted.
>>
>> <a href="/cobra_source/beneficiary_template.xls"
>> target="_blank">Excel template </a>
>>
>> P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
>>
>> thanks for your help
>>
>>   
> in the web.xml of your webapplication, you should properly define the
> contentype for .xls files.

(the <mime-types> section of your web.xml will need an additional entry)

p

> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: href to .xls file shows raw file

Posted by David Smith <dn...@cornell.edu>.
Could be caching issue.  Try clearing your browser cache and try again.

--David

alla winter wrote:

>I added to web.xml  ( on both, server level and application level) the
>following clause
><mime-mapping>
>        <extension>xls</extension>
>       <mime-type>application/vnd.ms-excel</mime-type>
>      </mime-mapping>
>
>and then restarted the server, but still got the same result
>Am I using the right set up?
>thanks
>
>
>
>On 10/15/07, Len Popp <le...@gmail.com> wrote:
>  
>
>>On 10/15/07, David Delbecq <de...@oma.be> wrote:
>>    
>>
>>>alla winter a écrit :
>>>      
>>>
>>>>I would appreciate if you would give me a hint, what should I do to
>>>>        
>>>>
>>make
>>    
>>
>>>>browser to display excell spread sheet when href to .xls file is
>>>>        
>>>>
>>selected?
>>    
>>
>>>>It displays the raw file insted.
>>>>
>>>><a href="/cobra_source/beneficiary_template.xls"
>>>>target="_blank">Excel template </a>
>>>>
>>>>P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
>>>>
>>>>thanks for your help
>>>>
>>>>
>>>>        
>>>>
>>>in the web.xml of your webapplication, you should properly define the
>>>contentype for .xls files.
>>>      
>>>
>>Specifically,
>>   <mime-mapping>
>>       <extension>xls</extension>
>>       <mime-type>application/vnd.ms-excel</mime-type>
>>   </mime-mapping>
>>In later versions of Tomcat, the default configuration has this mapping.
>>--
>>Len
>>
>>---------------------------------------------------------------------
>>To start a new topic, e-mail: users@tomcat.apache.org
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>    
>>
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: href to .xls file shows raw file

Posted by alla winter <al...@gmail.com>.
the clearing out browser cache worked out  well.
thanks a lot


On 10/15/07, Len Popp <le...@gmail.com> wrote:
>
> I tried this on Tomcat 5.0.28. With Internet Explorer I had to clear
> the browser cache before it would work. (With Firefox it worked with
> or without the mime-mapping. Firefox must be finding the program based
> on the file extension.)
> --
> Len
>
> On 10/15/07, alla winter <al...@gmail.com> wrote:
> > I added to web.xml  ( on both, server level and application level) the
> > following clause
> > <mime-mapping>
> >         <extension>xls</extension>
> >        <mime-type>application/vnd.ms-excel</mime-type>
> >       </mime-mapping>
> >
> > and then restarted the server, but still got the same result
> > Am I using the right set up?
> > thanks
> >
> >
> >
> > On 10/15/07, Len Popp <le...@gmail.com> wrote:
> > >
> > > On 10/15/07, David Delbecq <de...@oma.be> wrote:
> > > > alla winter a écrit :
> > > > > I would appreciate if you would give me a hint, what should I do
> to
> > > make
> > > > > browser to display excell spread sheet when href to .xls file is
> > > selected?
> > > > > It displays the raw file insted.
> > > > >
> > > > > <a href="/cobra_source/beneficiary_template.xls"
> > > > > target="_blank">Excel template </a>
> > > > >
> > > > > P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
> > > > >
> > > > > thanks for your help
> > > > >
> > > > >
> > > > in the web.xml of your webapplication, you should properly define
> the
> > > > contentype for .xls files.
> > >
> > > Specifically,
> > >    <mime-mapping>
> > >        <extension>xls</extension>
> > >        <mime-type>application/vnd.ms-excel</mime-type>
> > >    </mime-mapping>
> > > In later versions of Tomcat, the default configuration has this
> mapping.
> > > --
> > > Len
> > >
> > > ---------------------------------------------------------------------
> > > To start a new topic, e-mail: users@tomcat.apache.org
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: href to .xls file shows raw file

Posted by Len Popp <le...@gmail.com>.
I tried this on Tomcat 5.0.28. With Internet Explorer I had to clear
the browser cache before it would work. (With Firefox it worked with
or without the mime-mapping. Firefox must be finding the program based
on the file extension.)
-- 
Len

On 10/15/07, alla winter <al...@gmail.com> wrote:
> I added to web.xml  ( on both, server level and application level) the
> following clause
> <mime-mapping>
>         <extension>xls</extension>
>        <mime-type>application/vnd.ms-excel</mime-type>
>       </mime-mapping>
>
> and then restarted the server, but still got the same result
> Am I using the right set up?
> thanks
>
>
>
> On 10/15/07, Len Popp <le...@gmail.com> wrote:
> >
> > On 10/15/07, David Delbecq <de...@oma.be> wrote:
> > > alla winter a écrit :
> > > > I would appreciate if you would give me a hint, what should I do to
> > make
> > > > browser to display excell spread sheet when href to .xls file is
> > selected?
> > > > It displays the raw file insted.
> > > >
> > > > <a href="/cobra_source/beneficiary_template.xls"
> > > > target="_blank">Excel template </a>
> > > >
> > > > P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
> > > >
> > > > thanks for your help
> > > >
> > > >
> > > in the web.xml of your webapplication, you should properly define the
> > > contentype for .xls files.
> >
> > Specifically,
> >    <mime-mapping>
> >        <extension>xls</extension>
> >        <mime-type>application/vnd.ms-excel</mime-type>
> >    </mime-mapping>
> > In later versions of Tomcat, the default configuration has this mapping.
> > --
> > Len
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: href to .xls file shows raw file

Posted by alla winter <al...@gmail.com>.
I added to web.xml  ( on both, server level and application level) the
following clause
<mime-mapping>
        <extension>xls</extension>
       <mime-type>application/vnd.ms-excel</mime-type>
      </mime-mapping>

and then restarted the server, but still got the same result
Am I using the right set up?
thanks



On 10/15/07, Len Popp <le...@gmail.com> wrote:
>
> On 10/15/07, David Delbecq <de...@oma.be> wrote:
> > alla winter a écrit :
> > > I would appreciate if you would give me a hint, what should I do to
> make
> > > browser to display excell spread sheet when href to .xls file is
> selected?
> > > It displays the raw file insted.
> > >
> > > <a href="/cobra_source/beneficiary_template.xls"
> > > target="_blank">Excel template </a>
> > >
> > > P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
> > >
> > > thanks for your help
> > >
> > >
> > in the web.xml of your webapplication, you should properly define the
> > contentype for .xls files.
>
> Specifically,
>    <mime-mapping>
>        <extension>xls</extension>
>        <mime-type>application/vnd.ms-excel</mime-type>
>    </mime-mapping>
> In later versions of Tomcat, the default configuration has this mapping.
> --
> Len
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: href to .xls file shows raw file

Posted by Len Popp <le...@gmail.com>.
On 10/15/07, David Delbecq <de...@oma.be> wrote:
> alla winter a écrit :
> > I would appreciate if you would give me a hint, what should I do to make
> > browser to display excell spread sheet when href to .xls file is selected?
> > It displays the raw file insted.
> >
> > <a href="/cobra_source/beneficiary_template.xls"
> > target="_blank">Excel template </a>
> >
> > P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
> >
> > thanks for your help
> >
> >
> in the web.xml of your webapplication, you should properly define the
> contentype for .xls files.

Specifically,
    <mime-mapping>
        <extension>xls</extension>
        <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
In later versions of Tomcat, the default configuration has this mapping.
-- 
Len

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: href to .xls file shows raw file

Posted by David Delbecq <de...@oma.be>.
alla winter a écrit :
> I would appreciate if you would give me a hint, what should I do to make
> browser to display excell spread sheet when href to .xls file is selected?
> It displays the raw file insted.
>
> <a href="/cobra_source/beneficiary_template.xls"
> target="_blank">Excel template </a>
>
> P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
>
> thanks for your help
>
>   
in the web.xml of your webapplication, you should properly define the 
contentype for .xls files.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: href to .xls file shows raw file

Posted by Steve Ochani <oc...@ncc.edu>.
Date sent:	Mon, 15 Oct 2007 11:46:27 -0500
From:	alla winter <al...@gmail.com>
Subject:	href to .xls file shows raw file
To:	users@tomcat.apache.org
Send reply to:	Tomcat Users List <us...@tomcat.apache.org>

> I would appreciate if you would give me a hint, what should I do to
> make browser to display excell spread sheet when href to .xls file is
> selected? It displays the raw file insted.
> 
> <a href="/cobra_source/beneficiary_template.xls"
> target="_blank">Excel template </a>
> 
> P.S.  I am using Tomcat 5.0.28 and jdk 1.5.0._12
> 
> thanks for your help
> 

You need a mime type mapping in your web xml, like:

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg115069.html





---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org