Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dyna Action Vs Dispatch Action

 
kri shan
Ranch Hand
Posts: 1479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between Dyna Action and Dispatch Action ?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such thing as a "Dyna Action". There is a DynaActionForm which allows you to specify the properties of an ActionForm in the struts-config.xml file, rather than writing a class that extends ActionForm.

A DispatchAction is:


An abstract Action that dispatches to a public method that is named by the request parameter whose name is specified by the parameter property of the corresponding ActionMapping. This Action is useful for developers who prefer to combine many similar actions into a single Action class, in order to simplify their application design.


For example, you might have four buttons on the same form. If your Action extends DispatchAction, you can have four different methods in the same action the perform the four different functions without having to write four separate Action classes.

Here's the link to the Struts Javadoc You can use it to check out the details
 
vivek karemore
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I had a question in one of my interview about the Dyna Action in struts, can anybody tell me about this?
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, Avoid anyone using Struts 1.
Next, see Merrill's post above.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic