Ah, I have done battle with this one many times.  I grow weary of the fight.

First let me say that this problem can stem from a variety of causes given the many 
combinations of browser make, browser version, and web server make and version.  In 
the past I have found that I.E. ignores the content-type header (bad browser! bad 
browser!).  But, by all means, do as Tim says and set the proper header (probably 
text/csv).

If that doesn't do it, try adding a couple fake parameters to the URL (because I.E. is 
looking there to decide what client app to launch).  For example, if you have a 
servlet creating the CSV your URL might look like

http://localhost:8080/myservlet?a=b

change this to

http://localhost:8080/myservlet/foo.csv?a=b&saveas=/foo.csv

This is usually enough to convince the browser to do the right thing.

John

-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 9:10 PM
To: Tomcat Users List
Subject: Re: Excel sheets


Tomcat is not sending the right header back( Content-type probably). 
Telnet into port 80, simulate a web request and see what the server 
repsonse header is and adjust tomcat accordingly.

-Tim

David Epstein wrote:
> I have a website that serves up files, which are often .csv files. When
> I run the site using IIS (ick), a user with Excel on their machine will
> see the .csv files automatically open in Excel. But when I use the
> Tomcat server, I can't get it to do the same. Is there an easy way to
> enable this functionality?
> 
> Any help appreciated.
> 
> David Epstein
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to