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
State the procedure for using forward attribute of link tag’s.
What is meant by custom tags?
What do you mean by a custom tag?
What is action class? What are the types of action class?
What are the cons of struts 2?
What is the purpose of @before annotation?
What is the purpose of redirect result type?
Explain design patterns which is used in struts?
Why was reload removed from struts (since 1.1)?
What is struts2 in java?
What is the naming convention for a resource bundle file in struts2?
What is difference between interceptors and filters?
What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?
Are the struts tags xhtml compliant ?
while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert