How to configure custom action factory in MAFFilter
The MAFFilter uses the DefaultActionFactory per default. However, any implementation of net.anotheria.maf.action.ActionFactory will do. To add your own implementation, you have two ways:
- configure via web.xml
- overwrite and set.
To configure via web.xml simply add:
<filter> <filter-name>MAFFilter</filter-name> <filter-class>p.p.MAFFilterExtension</filter-class> <init-param> <param-name>actionFactory</param-name> <param-value>package.package.className</param-value> </init-param> </filter>
or simply call:
protected void setActionFactory(ActionFactory actionFactory) { this.actionFactory = actionFactory; }
in your extending class.