OK, I have embedded the code as suggested. Well, I have kept it simple and directly inserted the java code into the JSP page. But when I debug the code, the repository variable stays NULL, which then results in an error. I have "googled" this problem. And foremost solution for this seemed to be adding the common-lang into the class path. However, I already have my common-lang.2.3.jar in the /WEB-INF/lib/ folder and this still keeps happening.
So I must be missing something and I'm not quite sure what. Any suggestions would be greatly appreciated. Thanks, Jonathan Matt Raible-3 wrote: > > You should be able to get the MenuRepository from the ServletContext > and iterate over the menus to produce what you're looking for. Here's > some example code that may help: > > http://demo.raibledesigns.com/struts-menu/dynamicMenu.jsp > > Matt > > On Tue, Aug 19, 2008 at 4:39 AM, JMllr <[EMAIL PROTECTED]> wrote: >> >> Hi all, >> >> I use struts-menu in my web application to generate a tab menu and a site >> menu. All is working like a charm here. >> >> Now, I would like to use struts-menu to generate a site map for me. I >> thought all the information is in the menu-config.xml already. So >> wouldn't >> it be handy to reuse this information? >> >> However, I have arrived at a dead end. Let me explain... >> >> The set up of my menu-config.xml is somewhat like this: >> >> <?xml version="1.0" encoding="UTF-8" ?> >> >> <MenuConfig> >> >> <Displayers>...</Displayers> >> <Menus> >> >> <Menu name="PublicMenu"> >> <Item name="TabbedMenu1" title="Home" location="/home.jsp" >> description="HomeMenu"/> >> <Item name="TabbedMenu2" title="About" location="/about.jsp" >> description="AboutMenu"/> >> </Menu> >> >> <Menu name="HomeMenu"> >> <Item name="Something" title="Whatever" location="#"/> >> </Menu> >> >> <Menu name="AboutMenu"> >> <Item name="Something" title="Whatever" location="#"/> >> </Menu> >> </Menus> >> </MenuConfig> >> >> I know that there will always be a "PublicMenu" in my setup, but the >> other >> menus might change over time. >> >> I would like to use the description parameter to define jumps into the >> other >> menus, but I cannot seem to get this working. Is there any easy way to >> change the current menu to a different one within the Velocity code only >> relying on the name string? (e.g. what would I have to write in Velocity >> or >> Freemarker to reference the first item in "AboutMenu" when my displayMenu >> was called via "PublicMenu"?) >> >> Any help with this is much appreciated! >> >> Thanks, >> Jonathan >> -- >> View this message in context: >> http://www.nabble.com/Generating-a-site-map-via-struts-menu-tp19047462p19047462.html >> Sent from the struts-menu-user mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> struts-menu-user mailing list >> struts-menu-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/struts-menu-user >> > > > > -- > http://raibledesigns.com > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > struts-menu-user mailing list > struts-menu-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/struts-menu-user > > -- View this message in context: http://www.nabble.com/Generating-a-site-map-via-struts-menu-tp19047462p19086899.html Sent from the struts-menu-user mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ struts-menu-user mailing list struts-menu-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/struts-menu-user