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

How can we display validation errors on jsp page?

797


What is the actionform?

798


What is the purpose of form-be tag in struct-config.xml?

773


What are construction struts?

721


What are the classes used as part of struts framework ?

738


What is difference between actionform and dynaactionform?

813


How you will enable front-end validation based on the xml in validation.xml?

808


What's mvc pattern ?

794


How action-mapping tag is used for request forwarding in struts configuration file?

781


What applications use apache struts?

723


What is the purpose of @beforeresult annotation?

787


What is the use of form bean in struts?

723


What is actionservlet?

774


What are the benefits of Interceptors in Struts2?

922


What is struts and springs in java?

775