Different kinds of actions in Struts

Different kinds of actions in Struts.

- The different kinds of actions are done by the following:

1. DispatchAction
2. ActionDispatcher
3. LookupDispatchAction.

DispatchAction :

- One of the built-in actions provided by the struts framework.
- The collection of related functions into a single Action is possible using this action.
- It allows eliminating the creation of multiple independent actions for each function.

ActionDispatcher :

- It is a helper class which dispatches to a method that is in Action.
- This class provides an alternative mechanism for using DispatchAction.
- With the help of various types of mechanisms, the ‘dispatching’ behavior can be easily implemented into an Action without inheritance of a particular super Action class.

LookupDispatchAction :

- The subclass mapped execute() method is dispatched by this abstract Action class. This process is useful where a HTML form has many clicks on submit buttons with the same name. The corresponding ActionMapping’s parameter property specifies the button name.

Different kinds of actions in Struts.

Dispatch Action :

- It dispatches to a public method that is named by the request parameter whose name is specified by the parameter property of the corresponding ActionMapping.

- This Action is useful when many similar actions need to be combined into a single Action class design simplification.

Forward Action and IncludeAction :

- These forward and include the context-relative URI specified by the parameter property of our associated ActionMapping.
What is Action Class?
What is Action Class? - An Action class in the struts application extends Struts......
What is ActionForm?
What is ActionForm? - ActionForm is a Java bean that associates one or more ActionMappings....
Difference between Action and DispatchAction classes
Difference between Action and DispatchAction classes - Grouping related actions into one class is possible using DispatchAction class.....
Post your comment