[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to Create BreadCrumbs using Struts 1.1, Java and JSP

Posted on 2008-11-19
3
Medium Priority
?
4,222 Views
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:
Home
Contact Us
Help
Administration
 - 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,
0
Comment
Question by:nav29
  • 2
3 Comments
 
LVL 15

Expert Comment

by:quincydude
ID: 23001796
Hi,
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...
0
 

Author Comment

by:nav29
ID: 23003571
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.
0
 
LVL 15

Accepted Solution

by:
quincydude earned 2000 total points
ID: 23009917
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.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
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.
Suggested Courses

873 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