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

Why struts 1 classes are not thread safe whereas struts 2 classes are thread safe?

510


What is Struts2?

633


How to use dispatchaction?

585


Why do the struts tags provide for so little formatting?

595


How do you convert struts to springs?

561






What is difference between interceptors and filters?

543


Are interceptors and filters different?

555


What is the purpose of action tag in struts.xml?

570


What configuration changes are required to use Tiles in Struts?

578


What should be the name of xml file used for validation in struts?

549


What is the difference between shocks and struts?

506


How to upload struts file?

612


What is dispatchaction?

640


What is the use of form bean in struts?

516


What are construction struts?

521