struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "andy wix" <stix...@hotmail.com>
Subject RE: Identifying the 'clicked' line when iterating over collection
Date Wed, 01 Sep 2004 09:38:45 GMT
Hi,

I am trying to follow the advice given yesterday but am now baffled by the 
basic jstl stuff.
I have cut it down to basics and still get no output actually written to the 
page.  I've tried all variations on the theme (have the arraylist in the 
session, use c:outs in the "<TD>" tags etc).
The code is (I have omitted the html stuff):

<%
  Contact con1 = new Contact("name1");
  Contact con2 = new Contact("name2");

  ArrayList contacts = new ArrayList();
  contacts.add(con1);
  contacts.add(con2);
%>
    <TABLE border="1">
      <c:forEach var="contact" items="${contacts}" varStatus="status">
      <TR>
        <TD width="5">${status.index}</TD>
        <TD width="150">${contact.name}</TD>
      </TR>
      </c:forEach>
    </TABLE>

<c:out value="Testing"/>

The c:out tag at the end is the only bit that works (writes to the page) so 
I assume the taglib declaration at the top of the file is OK.

Cheers,
Andy

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message