org.springframework.web.servlet.mvc.multiaction
Class InternalPathMethodNameResolver

java.lang.Object
  extended byorg.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
      extended byorg.springframework.web.servlet.mvc.multiaction.InternalPathMethodNameResolver
All Implemented Interfaces:
MethodNameResolver

public class InternalPathMethodNameResolver
extends AbstractUrlMethodNameResolver

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
 
Fields inherited from class org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
logger
 
Constructor Summary
InternalPathMethodNameResolver()
           
 
Method Summary
protected  java.lang.String getHandlerMethodNameForUrlPath(java.lang.String urlPath)
          Return a method name that can handle this request, based on the given lookup path.
 
Methods inherited from class org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
getHandlerMethodName, setAlwaysUseFullPath, setUrlDecode, setUrlPathHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalPathMethodNameResolver

public InternalPathMethodNameResolver()
Method Detail

getHandlerMethodNameForUrlPath

protected java.lang.String getHandlerMethodNameForUrlPath(java.lang.String urlPath)
Description copied from class: AbstractUrlMethodNameResolver
Return a method name that can handle this request, based on the given lookup path. Called by this class' getHandlerMethodName.

Specified by:
getHandlerMethodNameForUrlPath in class AbstractUrlMethodNameResolver
Parameters:
urlPath - the URL path to use for lookup, according to the settings in this class
Returns:
a method name that can handle this request. Should return null if no matching method found.
See Also:
AbstractUrlMethodNameResolver.getHandlerMethodName(javax.servlet.http.HttpServletRequest), AbstractUrlMethodNameResolver.setAlwaysUseFullPath(boolean), AbstractUrlMethodNameResolver.setUrlDecode(boolean)


Copyright (C) 2003-2004 The Spring Framework Project.