Class ServletEventMappingDispatcher

All Implemented Interfaces:
Serializable, Dispatcher

public class ServletEventMappingDispatcher extends AbstractEventMappingDispatcher
This servlet-based dispatcher chooses the target method based on the parameter attribute of the ActionMapping that matches a submission parameter. This is useful for developers who prefer to use many submit buttons, images, or submit links on a single form and whose related actions exist in a single action.

To configure the use of this action in your configuration, create an entry like this:


   <action path="/saveSubscription"
           type="org.example.SubscriptionAction"
           dispatcher="org.apache.struts.dispatcher.servlet.ServletEventMappingDispatcher"/>
           parameter="save,back,recalc=recalculate,default=save"/>
           name="subscriptionForm"
           scope="request"
           input="/subscription.jsp"
 
where parameter contains three possible methods and one default method if nothing matches (such as the user pressing the enter key).
Since:
Struts 1.4
Version:
$Rev$
See Also: