Difference between Action and DispatchAction classes

Difference between Action and DispatchAction classes.

1. Grouping related actions into one class is possible using DispatchAction class. But in Action class a group related action into one class is not possible. Several changes need to be done, when one plans to group the related action using Action class.

2. Action class is used to perform single functionality. To perform multiple functionalities, we need to write an additional Action class.

3. The complexity rises if Action class is used for multiple functionalities, whereas by using DispatchAction, the code complexity will noticeably be reduced.

4. An Action class acts as a controller and is an adapter class between the web tier and the business tier.

5. Dispatch class is used to combine the related operations, thus share the common resources, helper classes for instance.

6. An Action is invoked by the ActionServlet to perform an operation that is depending on the URL request.

7. A DispatchAction selects a method depending on the value of the request parameter that is configured in the xml file.
What is switch action and forwardAction in struts?
Switch action and forwardAction - A SwitchAction is like an Action which switches between modules and forwards the control to the URI that is specified in the new module. ...
What is LookupDispatch Action?
What is LookupDispatch Action? - The LookupDispatch Action dispatches to the subclass mapped execute method....
Difference between ForwardAction and IncludeAction
Difference between ForwardAction and IncludeAction - Forwarding to a specified URL is provided by the ForwardAction. The mechanism to include the specified URL contents is proveided by the IncludeAction.....
Post your comment
Discussion Board
Reg: Dispatch Action and Action
As Per my Knowlege which not a fully studied bt telling that the main difference is we can pass the method name from the form jsp to its action class So, there the specified sent method is executed... meant we can Program the methods as much as we can by using dispatch action where in action class which extends Actionclass we can't...
saikumar 12-10-2015