class |
PrefixBasedActionMapper
A prefix based action mapper that is capable of delegating to other ActionMapper s 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. |