I am implementing a tree tag for one of my practice projects, where I would display the contents of a directory in the form of a tree (recursively). I had implemented a similar requirement as a Custom Tag in Java during the pre-JSP2.0 days.
Handling a directory needs recursion (to handle the subdirectories)! Is it possible to code this as tag files and can they be used in a recursive manner?
I am implementing a tree tag for one of my practice projects, where I
Share
Here is an example of an recursive tag file that displays from a node all it’s children recursivly (used to generate a YUI treeview):
/WEB-INF/tags/nodeTree.tag:
This can be used in a regular JSP file like this: