This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forEach type loop without items

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strange I've never ran across this yet. I need to create a dropdown with options 1-50. Any nice fancy way to use forEach or something similar that can work similar to for (int i = 1; i <= 50; i++) but without scriptlets?

Thanks.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:foreach/> has begin, end, and step attributes. To use foreach like your for loop with those attributes don't specify the items attribute. I'm looking at jstl 1.0.
[ December 05, 2006: Message edited by: Carol Enderlin ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect! Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic