• 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

Can a Web Application have two controllers?

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can a Web Application have two controllers? If yes, please give a scenario.

Also, what parser is used to parse the struts config file?

Thanks,
Srikanth.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can a Web Application have two controllers? If yes, please give a scenario.



An MVC-based web application can certainly have multiple "controllers" handling communications between the View and Model. In this case, there would still be a single Controller layer. The Controller would consist of multiple classes implementing "controller" behaviors.

In regards to an MVC "design", there is only one Controller layer.

In regards to a MVC "implementation", there can be many classes that implement "controller" behavior.

An example might be, a controller to handle internal functions and a controller to handle external functions.

This is design aspect. Also, how this question relates to the Struts framework is unclear.
[ October 24, 2008: Message edited by: James Clark ]
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you james for your response. Could you also tell me what parser does struts use to parse the struts-config.xml file.

Thanks,
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Could you also tell me what parser does struts use to parse the struts-config.xml file.



Thanks. Apache Struts is an open-source project. If this information is important to you, you can download the source code and find out what parser is used.

http://struts.apache.org/

Good luck!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic