You need to use varStatus to get the current index: <html-el:select property="yearsreferences"> <c:forEach begin="1" end="10" varStatus="status"> <html-el:option value="<c:out value="${status.count}"/>"> <c:out value="${status.count}" /> </html-el:option> </c:forEach> </html-el:select>
Steve > -----Original Message----- > From: struts [mailto:[EMAIL PROTECTED] > Sent: July 31, 2003 1:11 PM > To: Struts Users Mailing List > Subject: JSTL in html-el:option > > > The following yields Attribute ${i} has no value (first occurrence) error. > > <html-el:select property="yearsreferences"> > <c:forEach var="i" begin="1" end="10"> > <html-el:option value="<c:out value="${i}"/>"><c:out > value="${i}"/></html-el:option> > </c:forEach> > </html-el:select> > > Any suggestions on alternative syntax? > > Thanks, > Barry > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]