Need a component for supporting a navigation bread crumb...


Web tier: servlets, JSP, Web frameworks: Need a component for supporting a navigation bread crumb...

  1. I'm building a web site for my company and I'm faced with a challenge to create a navigable bread crumb that tracks the pages visited by the user. You have no doubt seen this on many web sites, looks something like this...

    Home > My Tasks > Expense Reports for ... > ...

    Does anyone know of a class, or perhaps a custom tag, that supports creating this on a JSP?


  2. Raffi,

    I think ur life would be much simpler if u write it urself.
    The logic can be simple. Have a class which has a arraylist. The values for this list will be the nav paths. In every page u will have 2 call a property of the class which will update the list. In the same pages to show the path 2 the user, you should call a get method which will return a string in the way u want it.

    Extra precaution has to be taken to update this bean.

    Even if u get a readymade bean u will have to write the code in every page to update this bean.

    -Deepak S Alur
  3. Yeah, I gotcha! Actually I wrote a component last week that uses an XML descriptor to find the definition of the path. It's actually a fairly complicated problem because the nav path appears different for user because my app supports many roles, so I needed to determine all possible nav path sequences for each role and store this information in the XML. Each page contains an identifier, like a page name, and the component uses the identifier to determine where the page exists in the sequence, and, all previous page names as well, then it generates the nav path.

    I also support request params that I can specify in the XML for each link so that the user can navigate the bread crumb, and it works great. I simply pass the request to the nav path generator and it takes care of the rest.

    Thanks again,

  4. Hi ,

      Iam in the process of creating a sample component for my application. It would be of great help if you can refer me some journals or share some of your codes to make my life easier.
    Thanks in advance.