How to Create BreadCrumbs using Struts 1.1, Java and JSP

Posted on 2008-11-19
Last Modified: 2013-11-24
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,
Question by:nav29
    LVL 15

    Expert Comment

    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...

    Author Comment

    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.
    LVL 15

    Accepted Solution

    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.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now