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 Comparing values in logic:iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Comparing values in logic:iterator" Watch "Comparing values in logic:iterator" New topic
Author

Comparing values in logic:iterator

Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi All,

How I can compare Values in a Vector when I am using logic:iterator tag?

Like this

<logic:iterate id="timeDetails" name="employeeTime"property="empTimeSchedules">

<bean:write property="StartTime" name="timeDetails"/>-<bean:write property="StopTime" name="timeDetails"/>
/** Comparison here */
<%
if(StartTime == StopTime){
}
else{
}
%>
</logic:iterate>

Can anyone tell me how can I compare these two Values??

Thanks in advance.


SCJP 1.2
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
You can use struts <logic:equal> and <logic:notEqual> tag libraries.

A lot of people from this forum recommend using JSTL. I have not yet started using it, but I think <c:if> and <c:choose> would satisfy your requirement.

Sheldon
 
GeeCON Prague 2014
 
subject: Comparing values in logic:iterator