tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: CSV File "Save as" dialogue defaults to HTM file
Date Mon, 25 Jan 2010 19:17:53 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ran,

> Thank you, but this solution doesn't seem to work on Jetspeed, due to the
> fact that I'm running JSR-168 Portlets on it. I don't believe they support
> changing the response's ContentType.
> 
> I wanted to know if there was anything about the Tomcat platform that could
> result in a CSV file defaulting to an HTM file, and if there was anything to
> do about it.

Tomcat will not mess around with any file extensions, etc.

If you don't set the Content-Disposition with the "attachment"
attribute, then the filename will default to that used in the URL, which
likely ends in ".htm" in your webapp, apparently.

In this case, you might have to switch to using a plain-old servlet
(which I would highly recommend over the use of a JSP in this case, as
JSPs can add all sorts of unwanted output to your generated files).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktd7mEACgkQ9CaO5/Lv0PAFNQCgjAPtEMbqkuitt0EG08JKZgPM
76cAn2oxfMPsNbCm2/x/7sAd3lGHbD/a
=7F2H
-----END PGP SIGNATURE-----

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


Mime
View raw message