This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about c:if test  RSS feed

 
Cesar Tg.
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Gurus!

I don't know why it doesn't work, according to me i should display
FALSE and it displays TRUE, what is it comparing?, what am i doing wrong?
please help me!, i don't know what else to do...

Regards!
Csar

<%
String s1 = "1";
String s2 = "2";
%>

value s1: <%= s1 %> <br>
value s2: <%= s2 %> <br>


<c:if test="${s1 == s2}" var="result"/>

<c ut value="${result}" />
[ September 28, 2005: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Cesar Tg.",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65830
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<%
String s1 = "1";
String s2 = "2";
%>


These are scripting variables.

${s1 == s2}


is an EL expression which references scoped variables.

They live on different planes of existance.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!