Hi, Which version of JSP+JSTL (and Tomcat) are you using? I am not sure but I think that the problem is due to fact that "1" is considered as an Integer class. This is possible, i suppose, in two cases: - you are using JSP1.2+JSTL1.0 - or in the taglib directive you are using "http://java.sun.com/jstl/core" and not "http://java.sun.com/jsp/jstl/core" also in JSP2.0+JSTL1.1. In "http://java.sun.com/jstl/core" you use the core1.0 and the expression language (EL) is evaluated by JSTL and not by JSP, so 1 is considered Integer (in this case in Java new Integer(1)==new Integer(1) is false). In the "http://java.sun.com/jsp/jstl/core" case the EL is evaluated by JSP and the 1 is considered int.
I hope this is useful BR /Amleto > -----Messaggio originale----- > Da: David Delbecq [mailto:[EMAIL PROTECTED] > Inviato: giovedì 20 ottobre 2005 12.33 > A: Struts Users Mailing List > Oggetto: stupid EL evaluation question > > > Hello, might some of you enlight my path to redemption? > > I tried to use this inside a jsp: > > <c:choose> > <c:when test="${1==1}"> > <html-el:select > property="actionParameters(${parameter.key}).value"> > <html-el:option value="true"/> > <html-el:option value="false"/> > </html-el:select> > </c:when> > <c:otherwise> > non boolean.... <html-el:text > property="actionParameters(${parameter.key}).value"/> > </c:otherwise> > </c:choose> > > strange enough, i always end in the otherwise part :/ (note, > c: correspond to jstl/core as struts don't have a switch case > in the logic taglib) > > To simplify the debugging i put this inside my jsp: > > <c:if test="${1==1}">1==1 yes</c:if> > > Test is evaluated as false! Now am sure, am in the twilight > zone. But this success: <c:if test="true">true is true</c:if> > > > jstl/core test parameter are supposed to accept EL evaluated > parameter. But i can't understand why mine are failing, > considering i have another webapp where things like that: > <c:if test="${param.mode=='list'}"> > > works perfectly as requested !!! > > Does someone have any idea why jstl/core would fail like that??? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.12.4/143 - Release > Date: 19/10/2005 > > -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.344 / Virus Database: 267.12.4/143 - Release Date: 19/10/2005 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]