How to Create BreadCrumbs using Struts 1.1, Java and JSP

I would like to create BreadCrumb based on where which menu user clicks. For eg.
left side menu contains menu and sub menus like:
Contact Us
 - List Users
 - Add User

BreadCrumb should look like:
Home > Contact Us
or Home > Administration > Add User

I am using Struts 1.1, and JSP. I need to know how to create it..
Thanks in advance,
Who is Participating?
quincydudeConnect With a Mentor Commented:
Hard coding means you write the code directly on the page and it cannot be changed dynamically. As you should know the hierarchy of your site structure.
If you are using struts, you may try to set a session variable (array for example) about the menu. So upon calling a page's action servlet, you change this variable 's content regarding which page you are visiting and so you can generate the menu using this variable at runtime.
I think making this kind of menu is not related to the framework. JSP and struts have nothing to do with it.  You just need to put the site hierarchy in a db and generate the menu at runtime from these data. On the straight forward case is you hard coding the menu on each page...
nav29Author Commented:
I don't get it what you mean by hard coding the menu on each page....

I have one left_menu.jsp file that contains this menu and I am including this file in all other jsp pages. Please let me know how to do it without putting these items in db.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.