In ActionClass we can use only one action i.e execute(), but
in DispatchAction we can use multiple actions.My question is
, we can use multiple actions in Action class
if(action.equals("add") if(action.equals("update"). Then
when to use Action and DispatchAction which is frequently
in webapplications.
Answer Posted / shirish
DispatchAction is generally used when we need to group a set
of actions. E.g. addDepartment, editDepartment,
updateDepartment, deleteDepartment. The method to be called
is identified on the basis of a parameter which can be
configured in struts-config.com (action tag). The parameter
is usually passed from the JSP and is automatically mapped
to the action parameter (defined in action tag in
struts-config.xml). Also we need to add an attribute with
name same as the parameter name to the corresponding ActionForm
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is the purpose of @results annotation?
What are apache struts?
What is the purpose of form-be tag in struct-config.xml?
What do struts do?
What is the purpose of '@customvalidator'?
What is the purpose of @doublerangefieldvalidator annotation?
Difference between struts and spring? Or why use spring, if you are already using struts?
What is use of i18n interceptor?
What is the use of Struts.xml configuration file?
What is declarative exception handling in struts?
How many servlet controllers are used in a Struts Application?
Why do we use struts?
What is the actionform?
Can we integrate struts with spring?
Which interceptor is responsible for mapping request parameters to action class Java Bean properties?