aspose file tools*
The moose likes Struts and the fly likes Difference between Action And DispatchAction in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference between Action And DispatchAction in struts" Watch "Difference between Action And DispatchAction in struts" New topic
Author

Difference between Action And DispatchAction in struts

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

Moving to the struts forum...


[My Blog]
All roads lead to JavaRanch
Fidel Edwards
Ranch Hand

Joined: Mar 19, 2008
Posts: 231
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)




God Gave Me Nothing I Wanted, He Gave Me Everything I Needed.
OCPJP6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Action And DispatchAction in struts