What Is The Dispatch Action In Struts?

1

1 Answers

Virgo Nadia Profile
Virgo Nadia answered
The Java language uses the method of DispatchAction class .This class does not provide an implementation for execute () method because DispatchAction class itself implements. This class represents the methods of the base Action class and requests for them. An Action Mapping is done to choose the exceptional method using by Struts-computing file.
The DispatchAction class holds different methods like add (), edit (), search (), save ().

All the methods take the same input parameters but each method returns a different ActionForward like "add" in case of add() method , "exit" in case of exit() etc.
Each ActionForward is defined in the struts-computing file. In a Struts Web application, applications do mostly defined by its action-mapping elements. An action-mapping is designed for an HTML form, and is often used with hyperlinks.

Each action-mapping can easily use StrutsAction class as its controller. Many of these, Action classes control associated operations, often signed by their name. Since all of these operations are usually controlled by the same JSP page, it would be handy also have to control them by the same Struts Action. The Struts Dispatch Action is designed to do exactly the same thing, but without disordered basic unit of logic.

Answer Question

Anonymous