Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@apache.org Received: (qmail 93314 invoked from network); 2 Sep 2002 04:26:32 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Sep 2002 04:26:32 -0000 Received: (qmail 5452 invoked by uid 97); 2 Sep 2002 04:27:10 -0000 Delivered-To: qmlist-jakarta-archive-taglibs-user@jakarta.apache.org Received: (qmail 5412 invoked by uid 97); 2 Sep 2002 04:27:09 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tag Libraries Users List" Reply-To: "Tag Libraries Users List" Delivered-To: mailing list taglibs-user@jakarta.apache.org Received: (qmail 5400 invoked by uid 98); 2 Sep 2002 04:27:09 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) To: taglibs-user@jakarta.apache.org Subject: Diff. between logic:equals and EL "eq" between null and "" From: dmkarr@earthlink.net (David M. Karr) Date: 01 Sep 2002 21:26:39 -0700 Message-ID: <86sn0tqao0.fsf@earthlink.net> Lines: 17 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter (Windows [3])) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: