File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.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:
subject: IE Mime type resolution?
It's not a secret anymore!