Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 04D5167B2 for ; Tue, 7 Jun 2011 19:30:23 +0000 (UTC) Received: (qmail 27813 invoked by uid 500); 7 Jun 2011 19:30:19 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 27605 invoked by uid 500); 7 Jun 2011 19:30:19 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 27596 invoked by uid 99); 7 Jun 2011 19:30:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 19:30:19 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [76.96.62.48] (HELO qmta05.westchester.pa.mail.comcast.net) (76.96.62.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 19:30:12 +0000 Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88]) by qmta05.westchester.pa.mail.comcast.net with comcast id t7GY1g0091uE5Es557VsDU; Tue, 07 Jun 2011 19:29:52 +0000 Received: from [192.168.1.201] ([69.143.109.145]) by omta16.westchester.pa.mail.comcast.net with comcast id t7Vr1g01A38FjT13c7Vsmw; Tue, 07 Jun 2011 19:29:52 +0000 Message-ID: <4DEE7C30.2060700@christopherschultz.net> Date: Tue, 07 Jun 2011 15:29:52 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: specifying the content-type References: <15785B7E063D464C86DD482FCAE4EBA5014267AFB9E4@XCH11.scidom.de> <4DE54839.4080808@christopherschultz.net> <15785B7E063D464C86DD482FCAE4EBA5014267AFB9E7@XCH11.scidom.de> <4DE64850.8070700@christopherschultz.net> <15785B7E063D464C86DD482FCAE4EBA5014267AFB9F0@XCH11.scidom.de> <4DE68B3E.6060908@christopherschultz.net>,<4DE6B764.2090201@ice-sa.com> <15785B7E063D464C86DD482FCAE4EBA5014267CC8FF9@XCH11.scidom.de> <4DE7EC66.70605@ice-sa.com> <4DECDD13.8080804@christopherschultz.net> <4DECE24D.6040808@ice-sa.com> <15785B7E063D464C86DD482FCAE4EBA50142696E11F9@XCH11.scidom.de> <4DEE6A2B.1010600@christopherschultz.net> <15785B7E063D464C86DD482FCAE4EBA50142696E11FE@XCH11.scidom.de> In-Reply-To: <15785B7E063D464C86DD482FCAE4EBA50142696E11FE@XCH11.scidom.de> X-Enigmail-Version: 1.2a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernd, On 6/7/2011 2:23 PM, Lentes, Bernd wrote: > Christopher Schultz wrote: >> >> How did you do it? If you use > CONTENT="text/html" />, it should override any Content-Type >> sent in the HTTP response headers > > Yes, we used this. But http://de.selfhtml.org/html/kopfdaten/meta.htm#zeichenkodierung (unfortunally only in german) says > "Im Konfliktfall, also wenn der Webserver im HTTP-Header eine hiervon abweichende Angabe sendet, wird üblicherweise die Angabe des HTTP-Headers verwendet.", which means that, if you have the META in the HTML-file and also the content-type in the HTTP-Header, mostly the HTTP-Header "wins". You're right. I had it wrong: the HTTP header overrides the content of the document. >>> Our developers try now to use the >>> response.setContentType("text/html"); method to configure the >>> content-type in the HTTP-Header. >> >> This is the proper way to do things. Using does not hurt. >> >> So... did it work? >> > > Using the META didn't work, the other way they'll try in the next days. I will inform you. If you want to be lazy with your code, you could use a Filter to set the Content-Type of all responses to text/html before the servlet gets a chance to set anything. If the servlet overrides it, everything is okay. If not, the Content-Type remains set to text/html. It's basically the same as using DefaultType in httpd but would require you to do more work. :( > - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3ufDAACgkQ9CaO5/Lv0PDsHwCgoMbKhbz20nCj8t8WTY1ZoP+O AuIAn0Qx5Kse+nHp0jqv8rVJcCkdkdPE =27hs -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org