tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Diff. between logic:equals and EL "eq" between null and ""
Date Mon, 02 Sep 2002 04:26:39 GMT
I noticed that with the Struts "logic:equal" tag, if you're comparing a
null-valued property with "", it returns true.  This is not unexpected, as the
documentation specifically states that a null property value is coerced to a
zero-length string before a comparison occurs.

However, in the JSTL, with an EL expression, comparing a null-valued scoped
variable with 'eq ""', it appears to return false.  This is curious, as I
noticed the statement in the JSTL spec in section A.7.1, titled "Coerce A to
String", which says 'Otherwise, if A is null: return "".'  If this is true,
this would imply that comparing a null-valued SV against "" would return true.

Is there something wrong here, either with the implementation or the spec?

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message