Difference between Action and DispatchAction


Below are the main differences between Struts Action and Dispatch Actions

  • 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.
  • Action class is used to perform single functionality. To perform multiple functionalities, we need to write an additional Action class.


  • The complexity rises if Action class is used for multiple functionalities, whereas by using DispatchAction, the code complexity will noticeably be reduced.
  • An Action class acts as a controller and is an adapter class between the web tier and the business tier.
  • Dispatch class is used to combine the related operations, thus share the common resources, helper classes for instance.
  • An Action is invoked by the ActionServlet to perform an operation that is depending on the URL request.
  • A DispatchAction selects a method depending on the value of the request parameter that is configured in the xml file.

No comments:

Post a Comment