Archive

Archive for the ‘Struts 1.X’ Category

MappingDispatchAction: a single Action class but several action tags

June 21st, 2008 No comments

The MappingDispatchAction class extends org.apache.struts.actions.DispatchAction.
It is similar to DispatchAction, except that a different action form, identified by the name attribute,
can be specified for each action mapping.

MappingDispatchAction: Use this when you want to define multiple form handlers for the same Action.

DispatchAction: Use this if for any reason you don’t want to define multiple form handlers (e.g., to make struts-config.xml more manageable).

So, instead of having a single action declaration, we will have one action declaration per method defined in the action class.
Very useful, if for instance, you need to handle different form beans for each method of the action class.

http://mani.fileave.com/tutor/StrutsTut.htm

Categories: Struts 1.X Tags: