Class PrefixBasedActionProxyFactory

All Implemented Interfaces:
ActionProxyFactory, Initializable

public class PrefixBasedActionProxyFactory extends StrutsActionProxyFactory implements Initializable

Prefix based factory should be used with PrefixBasedActionMapper to use appropriate ActionProxyFactory connected with given ActionMapper

Add below entry to struts.xml to enable the factory:

 <constant name="struts.actionProxyFactory" value="prefix"/>
 

The factory will use the same set of patterns as defined with:

 <constant name="struts.mapper.prefixMapping" value="..."/>
 
  • Constructor Details

    • PrefixBasedActionProxyFactory

      public PrefixBasedActionProxyFactory()
  • Method Details

    • setPrefixBasedActionProxyFactories

      public void setPrefixBasedActionProxyFactories(String list)
    • init

      public void init()
      Description copied from interface: Initializable
      Use this method to initialise your bean, the whole dependency graph was already built
      Specified by:
      init in interface Initializable
    • createActionProxy

      public ActionProxy createActionProxy(String namespace, String actionName, String methodName, Map<String,Object> extraContext, boolean executeResult, boolean cleanupContext)
      Description copied from interface: ActionProxyFactory
      Creates an ActionProxy for the given namespace and action name by looking up the configuration.The ActionProxy should be fully initialized when it is returned, including having an ActionInvocation instance associated.
      Specified by:
      createActionProxy in interface ActionProxyFactory
      Overrides:
      createActionProxy in class DefaultActionProxyFactory
      Parameters:
      namespace - the namespace of the action, can be null
      actionName - the name of the action
      methodName - the name of the method to execute
      extraContext - a Map of extra parameters to be provided to the ActionProxy, can be null
      executeResult - flag which tells whether the result should be executed after the action
      cleanupContext - flag which tells whether the original context should be preserved during execution of the proxy.
      Returns:
      ActionProxy the created action proxy