You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Srishankar Ramaswamy <Sr...@infosys.com> on 2002/07/12 06:42:09 UTC
"Doubt in logic:equal"
How do we compare two variables using logic:equal without using scriplet.
Bean1 {
String x;
}
Bean2 {
String y;
}
The logic required is :
if(b1.x == b2.y)
display message1.
else
display message2.
end if.,
where b1, b2 are objects of type Bean1, Bean2 respectively.
regards,
Srishankar.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: "Doubt in logic:equal"
Posted by Matt Raible <ma...@yahoo.com>.
Easy with JSTL if you have a JSP 1.2 container:
<c:choose>
<c:when test="${b1.x == b2.y}">
display message1.
</c:when>
<c:otherwise>
display message2.
</c:otherwise>
</c:choose>
In the future, these types of messages should be asked on the user's list.
HTH,
Matt
--- Srishankar Ramaswamy <Sr...@infosys.com> wrote:
> How do we compare two variables using logic:equal without using scriplet.
>
> Bean1 {
> String x;
> }
>
> Bean2 {
> String y;
> }
>
> The logic required is :
>
> if(b1.x == b2.y)
> display message1.
> else
> display message2.
> end if.,
>
> where b1, b2 are objects of type Bean1, Bean2 respectively.
>
> regards,
> Srishankar.
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>