I know there were a lot of people out there wanting to make a dynamic tree from a database. Here's the basic idea of what to do. If anyone wants some more concrete examples, I can add some code later.
I was using Struts 2, Spring, Hibernate and a MySQL database.
I wrote an action to parse my database into JSON and send it to the client via HTTP. I actually found a website with a good example, but unfortunately I didn't bookmark it. The basic idea is that you create a JSONObject, call toString on it, create a PrintWrite from the HttpResponse object and write the JSON string to it.
