接口 org.apache.struts2.dispatcher.mapper.ActionMapper
的使用

使用 ActionMapper 的软件包
org.apache.struts2.components   
org.apache.struts2.dispatcher Classes for action dispatching in Struts (the Controller part of MVC). 
org.apache.struts2.dispatcher.mapper   
org.apache.struts2.views.jsp Struts's JSP tag library. 
 

org.apache.struts2.componentsActionMapper 的使用
 

参数类型为 ActionMapperorg.apache.struts2.components 中的方法
 void UrlRenderer.setActionMapper(ActionMapper actionMapper)
           
 void ServletUrlRenderer.setActionMapper(ActionMapper mapper)
           
 void FormButton.setActionMapper(ActionMapper mapper)
           
 void Component.setActionMapper(ActionMapper mapper)
           
 void ActionComponent.setActionMapper(ActionMapper mapper)
           
 

org.apache.struts2.dispatcherActionMapper 的使用
 

参数类型为 ActionMapperorg.apache.struts2.dispatcher 中的方法
 void ServletRedirectResult.setActionMapper(ActionMapper mapper)
           
 void PostbackResult.setActionMapper(ActionMapper mapper)
           
 void FilterDispatcher.setActionMapper(ActionMapper mapper)
          已过时。 Modify ActionMapper instance.
 

org.apache.struts2.dispatcher.mapperActionMapper 的使用
 

实现 ActionMapperorg.apache.struts2.dispatcher.mapper 中的类
 class CompositeActionMapper
          A composite action mapper that is capable of delegating to a series of ActionMapper if the former failed to obtained a valid ActionMapping or uri.
 class DefaultActionMapper
          

Default action mapper implementation, using the standard *.

 class PrefixBasedActionMapper
          A prefix based action mapper that is capable of delegating to other ActionMappers based on the request's prefix It is configured through struts.xml For example, with the following entries in struts.properties <constant name="struts.mapper.class" value="org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper"/> <constant name="struts.mapper.prefixMapping" value="/communities:pseudoRestful,/communityTags:pseudoRestful,/events:pseudoRestful,/mediaList:pseudoRestful,/users:pseudoRestful,/community:struts,/communityTag:struts,/event:struts,/media:struts,/user:struts,:struts"/>

When PrefixBasedActionMapper.getMapping(HttpServletRequest, ConfigurationManager) or PrefixBasedActionMapper.getUriFromActionMapping(ActionMapping) is invoked, PrefixBasedActionMapper will check each possible prefix (url prefix terminating just before a /) to find the most specific ActionMapper that returns a mapping when asked to map the request.

 class Restful2ActionMapper
          Extended version of RestfulActionMapper, see documentation for more details http://struts.apache.org/2.x/docs/restfulactionmapper.html
 class RestfulActionMapper
          Simple Restfull Action Mapper to support REST application See docs for more information http://struts.apache.org/2.x/docs/restfulactionmapper.html
 

org.apache.struts2.views.jspActionMapper 的使用
 

参数类型为 ActionMapperorg.apache.struts2.views.jsp 中的方法
static String TagUtils.buildNamespace(ActionMapper mapper, com.opensymphony.xwork2.util.ValueStack stack, javax.servlet.http.HttpServletRequest request)