tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zack Chandler" <>
Subject Type coersion question. Comparing char equality
Date Mon, 17 Oct 2005 00:33:10 GMT
Hi.  Is there a way to not have the default type coercion (converts to Long)
happen when comparing chars.  I simply want to test for char equality in a
JSP.  See example below.  Thanks.

// Controller code
char tChar = 't';
request.setAttribute("tChar", tChar);

// Now in JSP enter this fragment
<!-- JSP Frag -->
Prints t

<c:if test="${tChar == 't'}">
<!-- End Frag -->

It crashes with this error:

javax.servlet.jsp.el.ELException: An exception occured trying to convert
"t" to type "java.lang.Long"

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

View raw message