Reputation: 1141
I recently came across the Java DefaultMutableTreeNode class. I was wondering if there is any similar classes/technology available for Servlets/JSPs.
I am working on a web application for which a database table stores absolute path name for various files, my servlet is supposed to read the path names from the table and display them as a directory tree structure.
Thanks so much in advance. Any advise will be appreciated.
Upvotes: 0
Views: 6471
Reputation: 31560
Would you use a jQuery plugin to display your paths as a tree?
https://www.abeautifulsite.net/jquery-file-tree
jQuery File Tree is a configurable, AJAX file browser plugin for jQuery. You can create a customized, fully-interactive file tree with as little as one line of JavaScript code.
Upvotes: 2
Reputation: 784
If you are willing to use a web application framework, you may also consider the Tree-component from Vaadin. See the Sampler for a Tree example, including source code.
Upvotes: 1
Reputation: 1108722
Not out the box. You have to create it yourself or to head to a 3rd party taglib or framework.
Several examples:
Upvotes: 1