tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <>
Subject RE: setContentType / File download
Date Wed, 14 Mar 2001 15:09:19 GMT
oh goodie... someone else who has this problem!

I battled this one for a looooong time and finally, microsoft sent out
the following article on their web:

And here is another article which I find interesting:

My guess... M$ tried to fix the bug in the later one but screwed up
somewhere along the line which resulted in the first one.

Anyways.  This is due to one of the very few *acknowledged* (by
Microsoft I mean) bugs in IE 5.5.... so sorry, nothing you can do about
it!  but on the bright side... it's nothing you did wrong either ;o)
(this is what I'm trying to convince myself of after spending waaayyy to
much time on this).

Regards, Stefan.

p.s. If you're using tomcat I'd suggest you use this code instead of
what you have (just for readability):

I solved this by checking the "User-Agent" header in the request and if
it was IE5.5 I don't set the Content disposition header.  This pops up
the Save file/open dialog box but if you choose to save you'll get a
garbled name...  but at least you'll get the file!

-----Original Message-----
From: Gerd Trautner []
Sent: 14. mars 2001 08:08
To: tomcat-user
Subject: setContentType / File download

Hi tomcat-user,

i have some troubles using the setContentType method.
I want to generate a CSV file of my database data and send it to the
browser. the browser should then say "save file as filenam.csv" ...

what i do is:

ontent-Disposition: attachment;filename=TUInventory.csv;");

this works for netscape browsers, but ie wants to save index.html.

any tips?


To unsubscribe, e-mail:
For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message