You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

ActionMapper is responsible for comming out with an ActionMapping which is basically a transfer-object, containing mapping information used by Dispatcher and various outer ui component to decide on which action to be executed. It is customizable through 'struts.mapper.class' property in struts.properties.

Customize

Custom ActionMapper must implements ActionMapper interface and have a default constructor.

struts.mapper.class=foo.bar.MyCustomActionMapper
public class MyCustomActionMapper implements ActionMapper {
  public ActionMapping getMapping(HttpServletRequest request, 
                                  ConfigurationManager configManager) {
    ....
  }

  public String getUriFromActionMapping(ActionMapping mapping) { 
    ....
  }
}
  • No labels