You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Olivier Dinocourt <ol...@anpe.fr> on 2002/01/31 15:21:48 UTC
Strange behaviour of the logic:equal tag
Hello list
I've found what seems to be a bug with the logic:equa tag :
I've tested the following struts code in a JSP :
...
<logic:equal name="FicheCandidatForm" property="paysCandidat" value="9F" >
<bean:write name="FicheCandidatForm" property="paysCandidat" /> est
egale à 9F
</logic:equal>
<logic:equal name="FicheCandidatForm" property="paysCandidat" value="9C" >
<bean:write name="FicheCandidatForm" property="paysCandidat" /> est
egale à 9C
</logic:equal>
<logic:equal name="FicheCandidatForm" property="paysCandidat" value="9" >
<bean:write name="FicheCandidatForm" property="paysCandidat" /> est
egale à 9
</logic:equal>
...
The "paysCandidat" property is of type java.lang.String
I assume the value attribute is also a String.
The JSP displays the following result :
...
09 est egale à 9F
09 est egale à 9
...
Which means that, for logic:equal, the Strings "09" and "9F" are equal, and
idem for "09" and "9"....
Is this a known bug, or am I missing something ?
TIA
olivier
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>