*
The moose likes Servlets and the fly likes IE Mime type resolution? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "IE Mime type resolution?" Watch "IE Mime type resolution?" New topic
Author

IE Mime type resolution?

Alok Pota
Ranch Hand

Joined: Mar 07, 2001
Posts: 185
Is there any way to force IE to always download a file when streaming
its contents to it?
I have the following code...

res.setContentType(mimeType);
res.setDateHeader( "Last-modified", file.lastModified());
res.setHeader("Content-Disposition", "attachment; filename=" + file.getName());
}
and if the file happens to be a txt file or textual in nature IE
renders it in-line (sometimes) and sometimes it shows the download box
Is there a definitive way to make it pop up the Save As box everytime.
?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IE Mime type resolution?
 
Similar Threads
How to download a file without save/open dialogue box ?
file download dialog box
to capture the event of save dialog box
Netscape 4.7 throws garbage instead of download file dialog box.
.csv files are opend in the same browser withour displaying the download dialog box.