Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 5655 invoked from network); 1 Oct 2009 10:38:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Oct 2009 10:38:38 -0000 Received: (qmail 3169 invoked by uid 500); 1 Oct 2009 10:38:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 3134 invoked by uid 500); 1 Oct 2009 10:38:34 -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 3123 invoked by uid 99); 1 Oct 2009 10:38:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 10:38:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2009 10:38:23 +0000 Received: from localhost (localhost [127.0.0.1]) by tor.combios.es (Postfix) with ESMTP id A0954226090 for ; Thu, 1 Oct 2009 12:38:02 +0200 (CEST) Received: from tor.combios.es ([127.0.0.1]) by localhost (tor.combios.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mjXrt--rv2iP for ; Thu, 1 Oct 2009 12:38:02 +0200 (CEST) Received: from [192.168.245.129] (p549EA6DE.dip0.t-ipconnect.de [84.158.166.222]) by tor.combios.es (Postfix) with ESMTPA id 5AC8C22608B for ; Thu, 1 Oct 2009 12:38:02 +0200 (CEST) Message-ID: <4AC4867E.9070106@ice-sa.com> Date: Thu, 01 Oct 2009 12:37:50 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Default character encoding for ServletRequest References: <4AC479F3.8090005@switch.ch> In-Reply-To: <4AC479F3.8090005@switch.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Halm Reusser wrote: > Hi, > > Calling <%= request.getCharacterEncoding() %> in a jsp deployed in a > Tomcat 6.0.20 container returns null. > > Is there any possibility to force a default CharacterEncoding for such > requests? > Don't worry, there is already a default. The only problem is to figure out what it is.. ;-) My guess, at this stage, is that it is either iso-8859-1 (which is the default charset for the HTTP protocol), or else it is tied to whatever "locale" your Tomcat's JVM has been started under. It would also depend on whether the request which you are processing is a GET or a POST. And, whatever you would decide to set as a default at the server level, you can still not be quite sure that the client's choice matches yours. Confused enough ? Sorry, but that's about the most definite thing that can be said on the subject, considering the various often conflicting specifications that play a role here. If the past is any guide however, this post will probably trigger a lively discussion. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org