This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Struts and the fly likes About using logic:equal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "About using logic:equal" Watch "About using logic:equal" New topic
Author

About using logic:equal

surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
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 ]

SCJP 1.4
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
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
 
GeeCON Prague 2014
 
subject: About using logic:equal