File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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.
?
 
 
subject: IE Mime type resolution?