Save This Page
Home » struts-2.0.11.2-src » org.apache » struts2 » dispatcher » mapper » [javadoc | source]
org.apache.struts2.dispatcher.mapper
public class: RestfulActionMapper [javadoc | source]
java.lang.Object
   org.apache.struts2.dispatcher.mapper.RestfulActionMapper

All Implemented Interfaces:
    ActionMapper

A custom action mapper using the following format:

You can have as many parameters you'd like to use. Alternatively the URL can be shortened to the following:

This is the same as:

Suppose for example we would like to display some articles by id at using the following URL sheme:

Your action just needs a setArticleId() method, and requests such as /article/1, /article/2, etc will all map to that URL pattern.
Field Summary
protected static final  Log LOG     
Method from org.apache.struts2.dispatcher.mapper.RestfulActionMapper Summary:
getMapping,   getUriFromActionMapping
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.dispatcher.mapper.RestfulActionMapper Detail:
 public ActionMapping getMapping(HttpServletRequest request,
    ConfigurationManager configManager) 
 public String getUriFromActionMapping(ActionMapping mapping)