From users-return-218030-apmail-tomcat-users-archive=tomcat.apache.org@tomcat.apache.org Fri Oct 15 14:20:01 2010 Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 80571 invoked from network); 15 Oct 2010 14:20:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Oct 2010 14:20:01 -0000 Received: (qmail 38637 invoked by uid 500); 15 Oct 2010 14:19:57 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 38385 invoked by uid 500); 15 Oct 2010 14:19:55 -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 38375 invoked by uid 99); 15 Oct 2010 14:19:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 14:19:55 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of oliver@siegmar.org designates 188.40.255.188 as permitted sender) Received: from [188.40.255.188] (HELO mail.sitix.net) (188.40.255.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Oct 2010 14:19:46 +0000 Received: from [195.71.165.224] (port=63297 helo=demucsiegm01.localnet) by mail.sitix.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69 and XAMS pre-0.0.19) id 1P6l7y-0006iF-Ga for users@tomcat.apache.org; Fri, 15 Oct 2010 16:19:22 +0200 From: Oliver Siegmar To: "Tomcat Users List" Subject: Re: Inconsistent output of Java 5 enums Date: Fri, 15 Oct 2010 16:19:16 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.35-22-generic; KDE/4.5.1; x86_64; ; ) References: <201010141824.36121.oliver@siegmar.org> <201010150740.40528.oliver@siegmar.org> <4CB86111.7020600@christopherschultz.net> In-Reply-To: <4CB86111.7020600@christopherschultz.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201010151619.16231.oliver@siegmar.org> X-SITIX-MailScanner-ID: 1P6l7y-0006iF-Ga X-SITIX-MailScanner: Found to be clean X-SITIX-MailScanner-From: oliver@siegmar.org X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No Chris, On Friday 15 October 2010 16:11:29 Christopher Schultz wrote: > > not. Sorry for the confusion. So this is a simplified example for my enum: > You're right: that was stupid of me. I had forgotten your toString method. > > Uh... why override the toString method like that? Well, as written in java.lang.Enum: An enum type should override this method when a more "programmer-friendly" string form exists. > > The thing is, that EL is using the name() method to print the enum and > > JSTL is using toString(). I did not expect a different enum treatment > > here. > > If you need it to emit the same thing, doing: > > No, because that would call a method getName() which doesn't exist - the method is named name(). Bye Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org