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 6609E96B4 for ; Mon, 16 Jan 2012 02:19:15 +0000 (UTC) Received: (qmail 56264 invoked by uid 500); 16 Jan 2012 02:19:11 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 56143 invoked by uid 500); 16 Jan 2012 02:19:11 -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 56127 invoked by uid 99); 16 Jan 2012 02:19:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 02:19:10 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.212.45 as permitted sender) Received: from [209.85.212.45] (HELO mail-vw0-f45.google.com) (209.85.212.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 02:19:04 +0000 Received: by vbjk17 with SMTP id k17so448646vbj.18 for ; Sun, 15 Jan 2012 18:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=XWcSPyaXkoncE0QoOPr/aVOwT+ztpCquToI/uvGUrT4=; b=E2EGTcnZMPN3JCkvBhNfcHw6Rr5coQckxbdkgIxCkhAaTWkqYAgIrnttcxpanPpAoL L/ZzzRvnh0ejgC1Vmz2rEL+kYOqgMgWiv9w5pegKzi+F8aAw+fWtaq5eJ3NapXXfBWpU YLP4E5YaxgsfCERfHIS2QTxzJ6UjUluMYTBzo= MIME-Version: 1.0 Received: by 10.52.24.239 with SMTP id x15mr4820242vdf.67.1326680323775; Sun, 15 Jan 2012 18:18:43 -0800 (PST) Received: by 10.52.93.243 with HTTP; Sun, 15 Jan 2012 18:18:43 -0800 (PST) In-Reply-To: References: Date: Mon, 16 Jan 2012 06:18:43 +0400 Message-ID: Subject: Re: POST data (single character) cleared when using tomcat 6.0.33 and Character Encoding Filter From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2012/1/16 kitagawa : > Hi, I'm new to this but please direct me if I'm posting to the wrong list= . > > While developing using ubuntu 11.04, tomcat 6.0.33 and java 1.5 I ran > into a problem after setting the character encoding filter for > requests. > When posting a request, the value of any field with only a single > character submitted is cleared. > > I also tested this issue with: > tomcat 6.0.32 and java 1.5 (no problem) > tomcat 6.0.35 and java 1.5 (same error occured) > tomcat 6.0.33 and java 1.6 (no problem) > tomcat 6.0.35 and java 1.6 (no problem) > > > This can be repeated using the RequestParamExample that comes with tomcat= . > > 1. uncomment the "Set Character Encoding" line in > apache-tomcat-6.0.33\webapps\examples\WEB-INF\web.xml (lines 88 and > 93) > 2. start tomcat > 3. go to http://localhost:8080/examples/servlets/servlet/RequestParamExam= ple > and enter a single character into the first or last name fields then > post. > > The entered value does not show up. Instead, the value shows up blank. > =A0If I enter two characters they appear correctly. > > I searched online for a solution but only came up with the following > from tomcat bugzilla > https://issues.apache.org/bugzilla/show_bug.cgi?id=3D51773 > > Does anyone know a solution to this problem? It is in the FAQ: http://wiki.apache.org/tomcat/FAQ/CharacterEncoding In short: enabling the filter makes Tomcat expect that the data (sent by web browser) use certain character encoding. But the web browser does not know that you configured the filter. See FAQ for how to do it properly. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org