sap
sap

Reputation: 1141

creating a Directory tree structure on a JSP

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

Answers (3)

Alberto Zaccagni
Alberto Zaccagni

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

KoW
KoW

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

BalusC
BalusC

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

Related Questions