You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/01/20 18:38:52 UTC
DO NOT REPLY [Bug 33180] New: -
JSTL automatic type conversion gives unexpected results
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33180>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33180
Summary: JSTL automatic type conversion gives unexpected results
Product: Tomcat 5
Version: 5.0.26
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: ekusnitz@allezsoftware.com
I have a bean with a property of type char. If I do a simple test, such as the
following:
<c:if test="${bean.property == 'C'}">
I get this error:
javax.servlet.jsp.el.ELException: An exception occured trying to convert String
"C" to type "java.lang.Long"
I would think it would convert the char to a String, given the testCondition,
not a Long.
There is a workaround -- creating a variable like this:
<c:set var="name" value="${bean.property} " with the extra space and then using
the fn:trim function.
However, I don't believe the automatic conversion should work this way.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org