aspose file tools*
The moose likes Other Application Frameworks and the fly likes Do I have a seperate springMVC controllor for every action? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Do I have a seperate springMVC controllor for every action?" Watch "Do I have a seperate springMVC controllor for every action?" New topic
Author

Do I have a seperate springMVC controllor for every action?

Glenn Timchishen
Greenhorn

Joined: Jun 20, 2004
Posts: 21
Hey,

I'm trying to model my web app I�m creating and I can't figure out how to map the controllers to the model.

Ok so if I have a OrderManager class that can "process and order", "edit the quantity of the order", or "cancel an order"

Do I create 3 controller classes that launch the three different methods?

or do I create one controller that somehow decides which task I want it to do, which then launches the specific object.method()??


Any help would be appreciated.
Praveen Babu
Ranch Hand

Joined: Jul 30, 2006
Posts: 138
Hi Glenn,

Consider using MultiActionController. Its much like Aggregate Actions in Struts which means a set of related actions as a single action class.

Refer to Spring documentation for the spring related syntax.

Regards,
P R A V E E N
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Do I have a seperate springMVC controllor for every action?