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

What is the difference between requestaware and servletrequestaware interface?

800


What are the Core classes of Struts Framework?

794


Which file is used by controller to get mapping information for request routing?

811


What are different ways to create Action classes in Struts2?

804


Can you explain value stack?

723


Can we have more than one struts-config.xml file for a single struts application?

720


How an actionform bean is created?

759


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

713


Difference between struts and spring? Or why use spring, if you are already using struts?

741


What is apache struts used for?

704


What is meant by custom tags?

764


What are the contents on web.xml in struts application ?

746


What is controller in struts ?

730


How to build struts application in eclipse?

749


How to use forward action to restrict a strut application to mvc?

807