The listener is a good place if it only needs to be initialized once for the application. If you need to initialize it differently for each user, I'd suggest putting it in a filter and caching the results.
On Tue, May 4, 2010 at 9:54 AM, Tony Luo <xiuxiu.luo.x...@gmail.com> wrote: > Just curious whether there is a better entry to support it. -,-b > > 2010/5/4 Matt Raible <m...@raibledesigns.com>: > > What's not working then? > > > > On Tue, May 4, 2010 at 9:45 AM, Tony Luo <xiuxiu.luo.x...@gmail.com> > wrote: > >> > >> Hi Matt, > >> > >> I still implmented it in StartupListener with the following code. > >> > >> MenuRepository repository = new MenuRepository(); > >> repository.setServletContext(context); > >> MenuDisplayerMapping displayerMapping = new > MenuDisplayerMapping(); > >> displayerMapping.setName("Velocity"); > >> > >> > displayerMapping.setType("net.sf.navigator.displayer.VelocityMenuDisplayer"); > >> repository.addMenuDisplayerMapping(displayerMapping); > >> > >> Everything works fine so far. Do you have any comments on it? > >> > >> Regards > >> Tony Luo > >> > >> 2010/5/4 Matt Raible <m...@raibledesigns.com>: > >> > You might try doing it in a filter. Either that or specify servlet 2.4 > >> > in > >> > your web.xml and order your listeners. > >> > > >> > On Tue, May 4, 2010 at 9:10 AM, Tony Luo <xiuxiu.luo.x...@gmail.com> > >> > wrote: > >> >> > >> >> Hi All, > >> >> > >> >> I tried to implement database driven menu in StartupListener. > >> >> But unfortunately, I can't get defaultMenuDisplayerMapping in > >> >> StartupListener.updateContext. > >> >> Is there any advice for this issue? Thanks. > >> >> > >> >> Regards > >> >> Tony Luo > >> >> > >> >> --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > >> >> For additional commands, e-mail: users-h...@appfuse.dev.java.net > >> >> > >> > > >> > > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > >> For additional commands, e-mail: users-h...@appfuse.dev.java.net > >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > >