• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how can we use MVC architecture best to implement Presentation layer menus

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it a good practise to use objects in the servlet side for the presentation layer menus and the navigation.
What would be a good way to implement these in a dynamic environment.
Depending on the state of server side variables, would JSP side be a better venue to implement menus.
Thanks a bunch.
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rao, You should take a look at Struts. It's a framework that encourages a clean distinction between Model, View, and Controller.
 
Author
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Brian Glodde:
Rao, You should take a look at Struts. It's a framework that encourages a clean distinction between Model, View, and Controller.


I agree, Struts is a good solution. If you were to not use Struts and create your own framework, however, a good solution is to store dynamic menu content as JavaBean components and then have your controller servlet stuff the beans into the JSP. You could then use a custom tag on your page to interact with the bean to generate menu entries and attributes (checked/unchecked, highlighted, underlined, etc...).
I hope this helps.
Andrew
 
reply
    Bookmark Topic Watch Topic
  • New Topic