Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Action And DispatchAction in struts

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i know about Action and DispatchAction is : For Add ,Edit , Delete we have to create seperate Action classes.
But in DispatchAction we can use all methods (add, delete , edit ) in single class which extends dispatchaction class.
If wrong means please explain how
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the struts forum...
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajendra Prakash wrote:But in DispatchAction we can use all methods (add, delete , edit ) in single class which extends dispatchaction class.If wrong means please explain how


Please refer DispatchAction which is subclass of Action.

Dispatch Action dispatches to a public method that is named by the request parameter whose name is specified by the parameter property of the corresponding ActionMapping in struts-config.xml (or your module specific xml). In simple term you can understand it as DispatchAction is overriding the execute() method of Action class but has different name (mentioned in your struts-config.xml)



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic