com.interface21.web.servlet.mvc.multiaction
Class InternalPathMethodNameResolver

java.lang.Object
  |
  +--com.interface21.web.servlet.mvc.multiaction.InternalPathMethodNameResolver
All Implemented Interfaces:
MethodNameResolver

public class InternalPathMethodNameResolver
extends java.lang.Object
implements MethodNameResolver

Simple implementation of MethodNameResolver that maps URL to method name. Although this is the default implementation used by the MultiActionController class (because it requires no configuration), it's bit naive for most applications. In particular, we don't usually want to tie URL to implementation methods.

Maps the resource name after the last slash, ignoring an extension. E.g. "/foo/bar/baz.html" to "baz", assuming a "/foo/bar/baz.html" controller mapping to the respective MultiActionController. Doesn't support wildcards.

Author:
Rod Johnson, Juergen Hoeller

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
InternalPathMethodNameResolver()
           
 
Method Summary
 java.lang.String getHandlerMethodName(javax.servlet.http.HttpServletRequest request)
          Return a method name that can handle this request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

InternalPathMethodNameResolver

public InternalPathMethodNameResolver()
Method Detail

getHandlerMethodName

public java.lang.String getHandlerMethodName(javax.servlet.http.HttpServletRequest request)
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.