This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Tree in Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tree in Servlet" Watch "Tree in Servlet" New topic

Tree in Servlet

Ann Toh
Ranch Hand

Joined: Jul 18, 2003
Posts: 45
Does anyone know how to write tree in servlet program?? i wan to display a tree on a particular directory. My program works like this: different users will have their own directory, so it will display the tree according to their directory. If can, can show me an example...
Thanx in advance...

[ September 30, 2003: Message edited by: Ann Toh ]
Ann Toh
Ranch Hand

Joined: Jul 18, 2003
Posts: 45
can anyone tell me whether inside the servlet, can i hav JTree??
Thanx in advance...
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12756
JTree is used for display in a Swing environment - with a servlet you can only write HTML to be displayed on the user's browser. If you want an active tree display on the user's browser you will have to use something like JavaScript or an applet. In an applet you can have a JTree if the user's browser has the Sun JVM, otherwise not.
I agree. Here's the link:
subject: Tree in Servlet
Similar Threads
Tree view in a servlet?
Embedding swings in HTML page
Hiding nodes in a JTree
To implement a tree using struts
directory tree structures