Two Laptop Bag
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

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){

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.

I agree. Here's the link:
subject: Comparing values in logic:iterator
It's not a secret anymore!