You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Oliver Siegmar <ol...@siegmar.org> on 2010/10/10 11:29:57 UTC

Insonsistent output of Java 5 enums

Hallo all,

I'm a bit confused about how differed Java 5 enums are handled in JSPs. I have 
an enum that has an overridden toString() method.

My JSP looks like this:

Output per EL: ${myEnumValue} <br/>
Output per JSTL: <c:out value="${myEnumValue}"/>


The output is:

Output per EL: VALID
Output per JSTL: valid result, code 0


The EL output is what I expected (based on section 1.18.2 of the 2.1 JSP-EL 
spec). But I expected the same output per JSTL.

Is this a bug or a feature? :-)


BTW: I'm using Tomcat 6.0.29 and JSTL 1.2.



Best

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Insonsistent output of Java 5 enums

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oliver,

On 10/10/2010 5:29 AM, Oliver Siegmar wrote:
> I'm a bit confused about how differed Java 5 enums are handled in JSPs. I have 
> an enum that has an overridden toString() method.
> 
> My JSP looks like this:
> 
> Output per EL: ${myEnumValue} <br/>
> Output per JSTL: <c:out value="${myEnumValue}"/>
> 
> The output is:
> 
> Output per EL: VALID
> Output per JSTL: valid result, code 0

What do your taglib declarations look like? I've only used the JSTL a
little bit, and I found that when you have the wrong taglib URL, things
don't work properly.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky2Br0ACgkQ9CaO5/Lv0PDGywCfYzGC04+VnY4wdP5KvXFqUCIk
2GQAoKwcFGmuul4sXCWjBxtJ+Ig72yyD
=pnsq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org