wood burning stoves 2.0*
The moose likes JSP and the fly likes forEach type loop without items Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "forEach type loop without items" Watch "forEach type loop without items" New topic
Author

forEach type loop without items

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
<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

Joined: Jul 11, 2001
Posts: 15299
    
    6

Perfect! Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: forEach type loop without items