tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Inconsistent output of Java 5 enums
Date Fri, 15 Oct 2010 14:11:29 GMT
Hash: SHA1


On 10/15/2010 1:40 AM, Oliver Siegmar wrote:
> Am Thursday 14 October 2010 schrieb Christopher Schultz:
>> So I'm surprised that Oliver is getting that weird output.
> I wrote in my initial mail to this list "I have an enum that has an overridden 
> toString() method". I thought it was clear what that means, obviously it was 
> 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?

> 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:

<c:out value="${}"/>

...will certainly work across these versions.

> One possible explaination is that Pid is right when he says "The related 
> sources jar was built in 2006, and the pom for that indicates that it's 
> dependent on JSP 2.0, rather than 2.1". Does anyone know if a true JSTL 1.2 
> using JSP 2.1 is available in the maven repository? Anyway I will try a 
> manually downloaded version tonight.

Try getting it from the canonical, and ask
them about their Maven repo submission.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message