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 do struts do?
When it’s useful to use IncludeAction?
How client side validation is enabled on a jsp form?
What is filter dispatcher in struts?
in struts how to use hibernate with struts>
How do you convert struts to springs?
Why are frameworks used?
Which configuration files are used in struts?
How many instances of servlet usually run in a struts application ?
How nested beans can be used in Struts applications?
Can we use struts and spring together?
What is the use of web xml in struts2?
Is struts compatible with other java technologies?
What's the purpose of execute method of action class?
What configuration files are used in struts?