com.opensymphony.webwork.dispatcher.mapper
Class RestfulActionMapper

java.lang.Object
  extended by com.opensymphony.webwork.dispatcher.mapper.RestfulActionMapper
All Implemented Interfaces:
ActionMapper

public class RestfulActionMapper
extends Object
implements 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.

Note: The RestfulActionMapper is not supported if you use the (deprecated) ServletDispatcher!

Author:
Cameron Braid, Jerome Bernard, Patrick Lightbody

Field Summary
protected static Log LOG
           
 
Constructor Summary
RestfulActionMapper()
           
 
Method Summary
 ActionMapping getMapping(HttpServletRequest request)
           
 String getUriFromActionMapping(ActionMapping mapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Log LOG
Constructor Detail

RestfulActionMapper

public RestfulActionMapper()
Method Detail

getMapping

public ActionMapping getMapping(HttpServletRequest request)
Specified by:
getMapping in interface ActionMapper

getUriFromActionMapping

public String getUriFromActionMapping(ActionMapping mapping)
Specified by:
getUriFromActionMapping in interface ActionMapper


Copyright © 2007 OpenSymphony. All Rights Reserved.