Class InternalPathMethodNameResolver

All Implemented Interfaces:

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.

Rod Johnson, Juergen Hoeller

Field Summary
protected  org.apache.commons.logging.Log logger
Constructor Summary
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


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


public InternalPathMethodNameResolver()
Method Detail


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
a method name that can handle this request. Never returns null; throws exception
NoSuchRequestHandlingMethodException - if no method can be found for this URL

Rod Johnson and Spring contributors 2001-2003.