Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the purpose of @results annotation?

1230


What are apache struts?

876


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

918


What do struts do?

927


What is the purpose of '@customvalidator'?

981


What is the purpose of @doublerangefieldvalidator annotation?

997


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

925


What is use of i18n interceptor?

954


What is the use of Struts.xml configuration file?

895


What is declarative exception handling in struts?

965


How many servlet controllers are used in a Struts Application?

1095


Why do we use struts?

1099


What is the actionform?

988


Can we integrate struts with spring?

965


Which interceptor is responsible for mapping request parameters to action class Java Bean properties?

1021