top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

When and how to use MultiActionController in Spring MVC?

+2 votes
120 views
When and how to use MultiActionController in Spring MVC?
posted Oct 1, 2013 by Arvind Singh

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

MultiActionController supports the aggregation of multiple request-handling methods into one controller, so allows you to group related functionality together. It is capable of mapping requests to method names and then invoking the correct method to handle a particular request.
Using the MultiActionController is especially useful when you have a lot of related functionality that would perhaps be appropriate to define all in a single class without having to implement one Controller for each bit of functionality.
There are two ways to use MultiActionController.
1.Subclass the MultiActionController and specify the methods that will be resolved by the MethodNameResolver.
2.You need to define a delegate object, on which methods resolved by the MethodNameResolver will be invoked. You will need to inject delegate object into the MultiActionController bean as a collaborator.

answer Oct 2, 2013 by Vinay Shukla
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...