This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to compare two variables in struts logic:equal

 
zimbu bolleddu
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm new to struts,

how to compare two variables in <logic:equal > tag.

variables something like : <% var1 %> and <% var2 %>.

please give me an example...!

Thanks in advance
 
Suresh Kumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

For comparing two request parameters, you can use

<logic:equal parameter="password" value="${ param.userName }">
Hi User, Thanks for visiting!!!
</logic:equal>

You can also compare attributes of a bean against constant values/rumtime expressions.

<logic:equal name="loginForm" property="username" value="user001">
Hi user001, Thanks for visiting!!!
</logic:equal>

Hope it is useful.

Suresh.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic