I'm not sure if this will work, but you can try. <c:forEach var="wrap" items="${Contacts}"> <c:forEach var="person" items="${wrap.id} scope="session"> <c:out value="${person.name}"/> </c:forEach> </c:forEach>
Not sure about this one: <c:forEach var="wrap" items="${Contacts}"> <c:forEach var="person" items="${sessionScope.wrap.id}" scope="session"> <c:out value="${person.name}"/> </c:forEach> </c:forEach> robert > -----Original Message----- > From: andy wix [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 09, 2004 7:38 AM > To: [EMAIL PROTECTED] > Subject: JSTL and collections > > > Hi, > > If I have a class Person which has id and name instance vars and have a > collection of these in a page how can I access the name if I have the id > available? > > So I have: > <c:forEach var="wrap" items="${Contacts}" varStatus="status"> > > where each wrap object has the id for a collection in the session scope > called Persons from which I wish to grab the name. > > Thanks, > Andy > > _________________________________________________________________ > It's fast, it's easy and it's free. Get MSN Messenger today! > http://www.msn.co.uk/messenger > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]