I've used trees in a number of my Struts applications, and I haven't had to use AJAX. What I've done is find an existing JavaScript tree package (the one I used was
TreeView) and incorporated that into my pages. In a case where I had a data model that had to be replicated into a tree structure, I wrote a
java class that acted as a JavaScript code generator that would generate JavaScript code for the TreeView API that matched the data model.
If you do it this way, all the behavior to expand and collapse the tree is handled on the client with JavaScript, but you can make each node into a hyperlink, so that if a user clicks on a node, the link is activated and you can then perform whatever action you need on the server side.