You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leo Amigood <le...@mosbusiness.ru> on 2001/09/12 03:40:43 UTC

According to the TLD attribute id is mandatory for tag iterate

I'm almost dead with solving this issue.
I'm getting this error "According to the TLD attribute id is mandatory for
tag iterate"
but everything seems similar to the previous guy code.

<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<jsp:useBean id="clist" scope="session" class="com.whatever.DBCountriesList"
/>
<logic:iterate id="country" name="clist" property="myCountry" >
	<bean:write name="country" property="title" />
<logic:iterate/>

1) i have getMyCountry() with returns ArrayList
2) and getTitle() in the Country objects with are nested into that ArrayList

any kind of help/examples would be appreciated.


Re: According to the TLD attribute id is mandatory for tag iterate

Posted by Cedric Dumoulin <ce...@lifl.fr>.
  You make a mistake when in your closing iterate tag. You have to put '/' at
the beginning, otherwise, you start a new tag, causing the error.

  So, write </logic:iterate> instead of <logic:iterate/>, and all should work
fine.

    Cedric

Leo Amigood wrote:

> I'm almost dead with solving this issue.
> I'm getting this error "According to the TLD attribute id is mandatory for
> tag iterate"
> but everything seems similar to the previous guy code.
>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> <jsp:useBean id="clist" scope="session" class="com.whatever.DBCountriesList"
> />
> <logic:iterate id="country" name="clist" property="myCountry" >
>         <bean:write name="country" property="title" />
> <logic:iterate/>
>
> 1) i have getMyCountry() with returns ArrayList
> 2) and getTitle() in the Country objects with are nested into that ArrayList
>
> any kind of help/examples would be appreciated.