setContentType
Alvin Chang <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <OFEC1AB1F7.39A5B184-ON86256CFE.005FB0DD-86256CFE.0060C0BF@arrisi.com> |
Hi,
I have a servlet which generates a comma separated value(CSV) file and the
browser will prompt a dialog so the user can save the output file
to a preferred location. It works fine on Netscape Navigator but when I
use IE6 I got the following error
"Internet Explorer was not able to open this Internet site. The requested
site is either unavailable ro cannot be found.
Please try again later".
I use the following statement
setContentType( "text/comma-separated" )
and I can get around it with
setContentType("text/plain");
but the browser will just display the plain text instead of a dialog box.
What MIME type shall I use so a dialog will prompt in both IE and
Netscape.
Thanks,
-Alvin Chang