• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested list jstl

 
Stijn Vermeulen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am creating a tree of categories which has an unkown depth. Therefore I have created an object which contains some properties and can contain childs of the same type.
These childs can contain it's own childs again, which can contains childs as well. etc.

how do I iterate over this object using jstl? Using a nested forEach won't work because I would not know how many forEach loops I would have to nest, could be 2 or could be 20.

Stijn
 
Stijn Vermeulen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After a colleague mentioned the word recursion, I started to google again and found this article.
This blog post answered my question:
http://blog.boyandi.net/2007/11/21/jsp-recursion/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!