• Post Reply Bookmark Topic Watch Topic
  • New Topic

Menu Management

 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am looking for the best way to manage menuing with JSPs and Servlets. Where is the best place to store the selected menu item, cookie or session or some other way? Any suggestions on implementation would be greately appreciated. Thanks
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my setup:


I have a table called menu_config to store all my menu configurations:


Lets say, that I have two main menu items A and B., where A has two sub menu items A1 and A1, my menu config will look like


When the user logs into the system, I get the menus from the database (and filter some menus based on the user's permission levels).

Then, I create TreeSet of menu items and store it in the session.

My menu.jsp simply gets this treeset from the session, loops through the menu items in the set and renders them.
[ July 06, 2006: Message edited by: Lynette Dawson ]
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Lynette. Do you have a Filter or Tag that you are using to set the selected menu item? If not, how are you handling it. Additionally any suggestions regarding using cookies pros/cons versus session managed would be greately appreciated.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!