This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Dyna Action  Vs  Dispatch Action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dyna Action  Vs  Dispatch Action" Watch "Dyna Action  Vs  Dispatch Action" New topic
Author

Dyna Action Vs Dispatch Action

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
What is the difference between Dyna Action and Dispatch Action ?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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


Merrill
Consultant, Sima Solutions
vivek karemore
Greenhorn

Joined: Oct 21, 2013
Posts: 3
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

Joined: Oct 29, 2001
Posts: 8836
    
    7

First, Avoid anyone using Struts 1.
Next, see Merrill's post above.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
 
subject: Dyna Action Vs Dispatch Action
 
Similar Threads
On Actions
need regarding DispatchAction
Action Form,Dyna Action Form,Validator Form,DynaValidatorForm,ValidatorAction,DynaValidatorAction
How to handle multiple action with in one page?
diff b/w action and dynaaction