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 / sekhar babu

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name some useful annotations introduced in Struts2?

526


What is Custom Type Converter in Struts2?

612


What’s the utilization of struts.xml configuration file?

523


Define struts?

616


What is struts-default package and what are it’s benefits?

566






How can link tag’s action attribute be used?

516


Name the different types of actions found in struts.

546


Explain the difference between plain-validator and field-validator in struts?

515


Can a reducer dispatch an action?

487


What is the purpose of interceptors?

523


What is the use of jsonvalidation in struts?

539


What is the use of jsonvalidation?

587


What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?

574


How we can controlled duplicate form submission in struts?

509


What are the important methods of actionform?

578