Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On Comparing Dates Using Struts

Status
Not open for further replies.

blueberry80

Programmer
Nov 10, 2003
1
SG
Hi, like to ask whether is there any clue as to solve the below senarios? I have used logic:iterate to loop the record and then used logic:NotEqual to compare the type but struck as to how to get the Latest to put under the latest date.Anyone can help me. Thanks

Type Date
type1 1/1/1999
type1 2/2/2000 Latest
type2 1/1/2001
type2 3/3/2002 Latest

Source code in my jsp:
<% String cType=&quot;&quot;; %>
<logic:present name=&quot;list&quot;>
<logic:iterate id=&quot;list1&quot; name=&quot;list&quot;>
<bean:define id=&quot;Type&quot; name=&quot;list1&quot; property=&quot;type&quot; />
<td>
<bean:define id=&quot;type&quot; name=&quot;list1&quot; property=&quot;type&quot; />
<bean:write name=&quot;list1&quot; property=&quot;type&quot; />
</td>
<logic:notEqual name=&quot;Type&quot; value=&quot;<%=cType%>&quot;>
Latest</logic:notEqual>
<% cType=type; %>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top