tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: specifying the content-type
Date Wed, 01 Jun 2011 18:55:58 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bernd,

On 6/1/2011 1:04 PM, Lentes, Bernd wrote:
>>
>> Okay. Can you post your servlet code, then?
> 
> I have to ask our developers.

Okay.

>> There is no default Content-Type for HTTP responses, so
>> getting a response directly from Tomcat might cause the
>> browser to auto-detect content.
> 
> That's what i also believe.

Sounds like Martin Kuen and I had the same idea moments apart.

>> You might want to properly set the Content-Type header in
>> your servlet code if you aren't already doing it.
>>
> How can i do that ?

You'd have to modify the code like this:

  response.setContentType("text/html");

(or whatever content type is appropriate in the situation).

Use of mod_headers or something similar may get this taken care of more
quickly, but fixing the code is a better long-term approach.

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

iEYEARECAAYFAk3miz0ACgkQ9CaO5/Lv0PBdcgCgpjCnxikUYyTdjdkp1SJU8+DH
qaMAn0DYaJIVz8H55ynT+4+aWvZ44urP
=N3Nq
-----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