...
Wiki Markup |
---|
{snippet:id=redirect-action-example|lang=xml|javadoc=true|url=org.apache.struts2.dispatcher.mapper.DefaultActionMapper} |
...
Custom ActionMapper
You can define your own ActionMapper by implementing org.apache.struts2.dispatcher.mapper.ActionMapper
then configuring the ActionMapperFactory:Struts 2 to use the new class in struts.xml
Code Block | ||
---|---|---|
| ||
<bean type=" | ||
Wiki Markup | ||
{snippet:id=javadoc|javadoc=true|url=org.apache.struts2.dispatcher.mapper.ActionMapperFactory}ActionMapper" name="struts" class="com.mycompany.myapp.MyActionMapper" /> |
Possible uses of the ActionMapper include defining your own, cleaner namespaces, such as URLs like /person/1, which would be similar to a request to /getPerson.action?personID=1 using the DefaultActionMapper.
...