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.
Answers were Sorted based on User's Feedback
Answer / 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 |
If multiple actions refer to the same formbean then we
should go for DispatchAction. Yes as you said it is possible
to write in Action. But by using dispatchAction we can
simply specify the parameter name in config file.
No need to write the code in our appln
| Is This Answer Correct ? | 3 Yes | 0 No |
why we are using vo,dao and dto design patterns in struts framework
Hai all.What is the use of <logic:iterate>tag in struts application.
What is struts validator framework?
What is interceptor? And life cycle methods of interceptor?
What are the some useful annotations introduced in struts2?
What does it cost to replace struts?
How to explain struts work flow
12 Answers CSS, iFlex, iGate, mpower, TCS,
Why do we need struts?
Is struts thread safe?
what is the use of cvs in struts?
What is apache struts vulnerability?
Is struts 1 still supported?