I know the question is targeted at doing this in a JSP, but why wouldn't you just set up a String[100] in application scope, name it "numbers" (or whatever) and do something like:
<html:select property="selectBox" styleClass="content"> <html:options name="numbers"/> </html:select> Quoting Mark Lowe <[EMAIL PROTECTED]>: > Nothing to add really just a few variations on a theme. > > <c:forEach var="num" begin="0" end="999"> > <html-el:option value=${num}"> > <c:out value="${num}" /> > </html-el:option> > </c:forEach> > > i think > > <c:forEach var="num" begin="0" end="999"> > <htmll:option value=<%= num %>"><%= num %>" /></html:option> > </c:forEach> > > will also work although perhaps you need to convert the int to a string. > > > > On 19 Dec 2003, at 12:50, dirk wrote: > > > I want to create a select box with the values 1 thru 100 how can i do > > that? What i have is: > > But that is not working. Any idea ? > > Thanks ! > > <html:select property="selectBox" styleClass="content"> > > > > <% for(int i=0;i<999;i++){ %> > > > > <html:option value="<%=i%>"><%=i%></html:option> > > > > <%}%> > > > > </html:select> -- Kris Schneider <mailto:[EMAIL PROTECTED]> D.O.Tech <http://www.dotech.com/> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]