• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference between Action And DispatchAction in struts

 
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the struts forum...
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)



 
reply
    Bookmark Topic Watch Topic
  • New Topic