wood burning stoves 2.0*
The moose likes Struts and the fly likes logic:match Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:match" Watch "logic:match" New topic
Author

logic:match

aamchi mumbai
Greenhorn

Joined: Mar 04, 2005
Posts: 19
Hi,

<bean efine id=[B]"toCompare"[B] value="JAVA"/>

<logic:match name="data" property="name" value=[B]""[B] location="start">
Matching......
</logic:match>

i want to match name property with "JAVA" value but i dont want to write value="JAVA". is there any way i can compare with variable value. in this case can i specify compare with "toCompare" variable.

Thanks,
aamchi mumbai
Greenhorn

Joined: Mar 04, 2005
Posts: 19
Hi,

<bean define id="toCompare" value="JAVA"/>

<logic:match name="data" property="name" value="" location="start">
Matching......
</logic:match>

i want to match name property with "JAVA" value but i dont want to write value="JAVA". is there any way i can compare with variable value. in this case can i specify compare with "toCompare" variable.

Thanks,
aamchi mumbai
Greenhorn

Joined: Mar 04, 2005
Posts: 19
i got the answer

using this i can do that

logic:match name="data" property="name" value="<%=toCompare%>" location="start">
Matching......
</logic:match>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: logic:match