This is due to the fact explorer and netscape recognize mime types and act
accordingly. If a broswer doesn't recognize a mime type it will then prompt
you to treat it as a file. For both good and bad. explorer is tightly
integrated with other MS products and will usually open up a excel or word
in a sub window. Since this behavior can be also consider to be good, I dont
like to undo it. Instead, I approach the problem froma different angle. You
can set the content type of your page to something explorer/netscape won't
recognize. Then when explorer gets the file it will prompt you to download
the file. (for example I set mine to
"application/x-felix download" since I know it is my own unique mime type, I
dont have to worry that some pre-defined mime type on the users machine will
interfere)
Casey
[EMAIL PROTECTED]
www.jspinsider.com
>From: sridhar r <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: problem with IE
>Date: Sun, 17 Sep 2000 08:13:47 -0700
>
>Hi
>I have a problem with the IE.When I try to download a
>file with the given content type and header,the file
>gets downloaded perfectly into our local machine with
>Netscape browser but when i try with IE it gets opened
>in the browser itself.Can anyone give me a solution in
>overcoming this problem.
>
>response.setContentType("application/vnd.ms-excels;
>charset=us-ascii");
>
>response.setHeader("Content-Transfer-Encoding",
>"7bit");
>
>response.setHeader("Content-disposition",
>"attachment; filename=\"sample.xls\"");
>
>regards
>Sridhar
>
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets