开发者

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.


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.


Not out the box. You have to create it yourself or to head to a 3rd party taglib or framework.

Several examples:

  • A 3rd party JSP taglib
  • A tag of the Struts2 framework
  • A tag of a 3rd party JSF component library
  • A tag of another 3rd party JSF component library


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜