Link to home
Start Free TrialLog in
Avatar of clo1
clo1

asked on

Struts logic:iterate questions

I am using logic:iterate like follow

<%
      java.util.ArrayList keyList = new java.util.ArrayList();
      keyList.add("key1");
      keyList.add("key2");
      keyList.add("key3");
      pageContext.setAttribute("keyList", keyList, PageContext.PAGE_SCOPE);
%>

<tr>
    <logic:iterate id="keyListing" name="keyList">
        <td>
          <bean:write name="keyListing" />
        </td>
    </logic:iterate>
</tr>

I would like to know

1. How can I display a link for each row after the displaying of "key1", "key2", "key3" ?
2. How can I check if it is the last element in the collection, i.e. key3 ?

Please help. Thanks a lot !!
ASKER CERTIFIED SOLUTION
Avatar of avinthm
avinthm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial