Display tree structure on a jsp using Recursion and JSTL
I would like to implement a tree structure in my JSP baised
web-application using recursion and JSTL.The values of tree is populated
from database using java(using some list or map..).I know this question
may be asked by some peoples.but i didn't get any idea from those
resources.Please help me..
Here is my Table Structure for company table.
Column Type
Company_id int
Company_parent_id int
Company_name varchar(50)
Class Company
public Class Company{
private int companyId;
private int companyParantId;
private String companyName;
//getters&setters
}
Sample tree structure that i watnt to implement.
1
1.1
1.2
1.2.1
1.2.1.1
2
2.1
3
3.1
3.1.1
.....
n
n.1
....
My question is How can i implement Recursion in jsp with the help of JSTL?.
Thanks,
No comments:
Post a Comment