aspose file tools
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

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "About using logic:equal" Watch "About using logic:equal" New topic

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.

[ 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
It is sorta covered in the JavaRanch Style Guide.
subject: About using logic:equal