• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About using logic:equal

 
surendar prabu
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using logic:equal tag to compare value of a property with a constant.
If want to compare values of two properties how can i achieve it.

If i have properties string s1 and string s2, how can i compare them in my JSP?

please help.

regards,
Surendarprabu
[ February 27, 2007: Message edited by: surendar prabu ]
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jstl tags make this much easier. Another option is to create a method in your Action Form that returns a boolean value. So rather than having logic in your JSP like (if firstName = 'George' and lastName = 'Bush') you would move this code into your form into a single method named like isCurrentPresident() or getCurrentPresident().

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic