my dog learned polymorphism*
The moose likes Servlets and the fly likes servlet file download works in Firefox but not IE 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet file download works in Firefox but not IE 6" Watch "servlet file download works in Firefox but not IE 6" New topic
Author

servlet file download works in Firefox but not IE 6

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
We're trying to store some user-generated reports in the database and then let the user view/download them (both HTML and CSV versions). There are no problems with the HTML one. On Firefox, the CSV one brings up the browser's file download box like it's supposed to, and it even puts the filename I told it to as the default save name ("ShipmentReport" + accountnbr + ".csv"). However, for IE 6, it gets to the point where it asks you if you want to save the file, but then when you click either Open or Save, it pops up with another windows that says:


I've tried changing the content disposition header to "application/octet-stream" for the CSV one, as well as set the content length, but none of that helps. IE 6 keeps popping up with that weird message AFTER you click Open or Save on the file download box, and this is only when it's a Linux webserver (IE acts fine when I'm accessing the Tomcat on localhost, which is a Windows machine).

Lots of folks must be doing this somehow... What am I doing wrong?
[ January 13, 2005: Message edited by: Stephen Huey ]
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
I took out those 3 lines at the top related to the cache and it works now!


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet file download works in Firefox but not IE 6
 
Similar Threads
opening pdf inline in a new pop up
How to download csv file
Cannot get Netscape 6.1 to open save as dialog box
IE Hangs when I use servlet to download a file
.csv files are opend in the same browser withour displaying the download dialog box.