This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Else If you just want to display the tree without providing and action to the tree you can use something like this.
The table would have a structure similar to the following:
col 1col 2col 3col 4 col 1.0 buttoncol 2.0 buttoncol 3.0 buttoncol 4.0 col 1.1 buttoncol 2.1
col 1.2 buttoncol 2.2 button col 3.2
A reasonably simple Map based data structute should be sufficient to help stored the data model while the table is generated. When generating the HTML, if you turn off all the cell borders then you'll have something that looks much like a tree. If you add little buttons to the cells as indicated by 'button' and write some code behind them then you can use them to collapse/expand individual nodes in the tree. This collapsing/expanding could be done client side (using JavaScritpt and DIV elements wrapping the cells to hide/display) or server side (re-generate the table for that request with certain rows included/excluded).