• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forEach type loop without items

 
Gregg Bolinger
Ranch Hand
Posts: 15304
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
Ranch Hand
Posts: 15304
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