com.interface21.web.servlet.mvc.multiaction
Class ParameterMethodNameResolver
java.lang.Object
|
+--com.interface21.web.servlet.mvc.multiaction.ParameterMethodNameResolver
- All Implemented Interfaces:
- MethodNameResolver
- public class ParameterMethodNameResolver
- extends java.lang.Object
- implements MethodNameResolver
Simple implementation of MethodNameResolver that looks for a
parameter value containing the name of the method to invoke.
This class is a JavaBean, so the parameter name can be set
via the paramName property. The default value is "action".
- Author:
- Rod Johnson
|
Method Summary |
java.lang.String |
getHandlerMethodName(javax.servlet.http.HttpServletRequest request)
Return a method name that can handle this request. |
void |
setParamName(java.lang.String paramName)
Set the parameter name we're looking for.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParameterMethodNameResolver
public ParameterMethodNameResolver()
setParamName
public void setParamName(java.lang.String paramName)
- Set the parameter name we're looking for.
The default is "action".
- Parameters:
paramName - the parameter name we're looking for
getHandlerMethodName
public java.lang.String getHandlerMethodName(javax.servlet.http.HttpServletRequest request)
throws NoSuchRequestHandlingMethodException
- Description copied from interface:
MethodNameResolver
- Return a method name that can handle this request. Such
mappings are typically, but not necessarily, based on URL.
- Specified by:
getHandlerMethodName in interface MethodNameResolver
- Following copied from interface:
com.interface21.web.servlet.mvc.multiaction.MethodNameResolver
- Returns:
- a method name that can handle this request.
Never returns null; throws exception
- Throws:
NoSuchRequestHandlingMethodException - if no method
can be found for this URL
Rod Johnson and Spring contributors 2001-2003.