Re: AW: setContentType / File download
Andreas Mecky, Wednesday, March 14, 2001, 1:14:45 PM, you wrote: > Hi, > try this: > response.setContentType(application/msexcel); > response.setHeader("Content-Disposition","inline; filename="here goes my > filename"); > this works for me in IE and NS. yes, this works. thanks! gerd
RE: setContentType / File download
oh goodie... someone else who has this problem! I battled this one for a long time and finally, microsoft sent out the following article on their web: http://support.microsoft.com/support/kb/articles/Q279/6/67.ASP And here is another article which I find interesting: http://support.microsoft.com/support/kb/articles/Q267/9/91.ASP 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): response.setContentType("application/msexcel"); response.setHeader("Content-Disposition","attachment;filename=TUInventor y.csv"); p.p.s. 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 [mailto:[EMAIL PROTECTED]] 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: response.setContentType("application/msexcel;name=\"TUInventory.csv\"\nC ontent-Disposition: attachment;filename=TUInventory.csv;"); this works for netscape browsers, but ie wants to save index.html. any tips? Gerd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
AW: setContentType / File download
Hi, try this: response.setContentType(application/msexcel); response.setHeader("Content-Disposition","inline; filename="here goes my filename"); this works for me in IE and NS. WBR Andreas Mecky > -Ursprungliche Nachricht- > Von: Gerd Trautner [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 14. Marz 2001 09:08 > An: tomcat-user > Betreff: 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: > > response.setContentType("application/msexcel;name=\"TUInventory.cs > v\"\nContent-Disposition: attachment;filename=TUInventory.csv;"); > > this works for netscape browsers, but ie wants to save index.html. > > any tips? > > Gerd > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: setContentType / File download
On Wed, 14 Mar 2001 09:07:57 +0100, Gerd Trautner wrote: >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: > >response.setContentType("application/msexcel;name=\"TUInventory.csv\"\nContent-Disposition: > attachment;filename=TUInventory.csv;"); > >this works for netscape browsers, but ie wants to save index.html. > On the cocoon-users there's been a discussion about the following code response.setHeader("Content-Disposition", "inline;filename=kluge.txt"); they said it was an "unofficial" IE header for the same purpose. haven't tested it myself, but looks like we now have two complementry solutions, for IE and NS :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: setContentType / File download
Please help, we encounter similar problem but with IE5.5 only (no problem with all Netscapes, and IE5.01 and below versions). Seems MS has changed something in IE5.5 Kenneth -Original Message- From: Gerd Trautner [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 14, 2001 4:08 PM 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: response.setContentType("application/msexcel;name=\"TUInventory.csv\"\nConte nt-Disposition: attachment;filename=TUInventory.csv;"); this works for netscape browsers, but ie wants to save index.html. any tips? Gerd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
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: response.setContentType("application/msexcel;name=\"TUInventory.csv\"\nContent-Disposition: attachment;filename=TUInventory.csv;"); this works for netscape browsers, but ie wants to save index.html. any tips? Gerd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]