Re: how can I compare strings in c:if

2002-04-10 Thread Shawn Bayern
Glenn, You're right: thanks for the correction. The scriplet should read <% String a = "foo"; String b = new String(a); pageContext.setAttribute("a", a); pageContext.setAttribute("b", b); %> The point remains: the JSTL expression language's '==' operator leads to a call t

Re: how can I compare strings in c:if

2002-04-10 Thread Glenn R. Kronschnabl
Shawn, Just to clarify - your code snippet is very misleading. The reason evaluates to true is because null == null, not because "a == b" where a = "foo". a & b are not in any scope so in the EL, a & b are null - in fact it doesn't matter what you set a or b to. Changing your example a little

Re: how can I compare strings in c:if

2002-04-09 Thread Shawn Bayern
On Tue, 9 Apr 2002, marba wrote: > javax.servlet.ServletException: Attempt to apply operator "<" to arguments > of type "org.apache.taglibs.standard.tag.common.sql.ColumnImpl" and > "org.apache.taglibs.standard.tag.common.sql.ColumnImpl" Ah, I believe you're using an older version of the JSTL RI

Re: how can I compare strings in c:if

2002-04-09 Thread marba
- Original Message - From: "Shawn Bayern" <[EMAIL PROTECTED]> To: "marba" <[EMAIL PROTECTED]> Sent: Tuesday, April 09, 2002 6:36 PM Subject: Re: how can I compare strings in c:if > On Tue, 9 Apr 2002, marba wrote: > > > > Make sure t

Re: how can I compare strings in c:if

2002-04-09 Thread Shawn Bayern
Are you sure the strings are really identical? For instance, just to be sure you're using two different Strings with the same value, you can experiment via the String copy constructor. Doing this demonstrates that JSTL's '==' operator does work correctly: <%@ taglib prefix="c" uri="http://jav

how can I compare strings in c:if

2002-04-09 Thread marba
I'm try to compare two string fields in a MySql table row here's my code that evaluate false even if the strings are identical: SELECT * FROM FILIALI_EXT_LOG LEFT JOIN FILIALI_EXT USING (ID) WHERE FILIALI_EXT_LOG.LASTMODI >