tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <elihusma...@gmail.com>
Subject Internet Explorer and Content-Type
Date Mon, 25 Jul 2005 13:54:55 GMT
I have a servlet that generates data that I want to write to the
client's browser.  This data is just ASCII text.  The problem that I
am running into is that Internet Explorer's "Save As" window defaults
the filename to the name of my servlet.  Firefox/Netscape will save
the file as the filename that I specify in the Content-Type HTTP
header.
Does anyone know how to fix this?

Here is the code that I am currently using:

response.setContentType("text/xyz" );
response.setHeader("Content-Disposition", "Attachment; filename=\"blah.xyz\"");

Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message