This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

How to create default beans accessible by every page ?Page Title Module

How to create default beans accessible by every page ?

Jun 23rd, 2005, 07:45 AM

I would like to have certain objects accessible in every page of my webapp.
I have a JavaScript menu that I want to generate dynamically from the DB, and as the menu is on every page, I will need the DAo object in every page.

Ideally I could use <jsp:useBean> tag to retrieve them in the page.

What is the best way to achieve this ?

Do I need to place them in the ModelAndView in every controller that I have, or should I override DispatcherServlet and stick them in the page context ?