|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver
public abstract class AbstractUrlMethodNameResolver
Abstract base class for URL-based MethodNameResolver implementations.
Provides infrastructure for mapping handlers to URLs and configurable
URL lookup. For information on the latter, see alwaysUseFullPath
and urlDecode
properties.
setAlwaysUseFullPath(boolean)
,
setUrlDecode(boolean)
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
Logger available to subclasses |
Constructor Summary | |
---|---|
AbstractUrlMethodNameResolver()
|
Method Summary | |
---|---|
String |
getHandlerMethodName(HttpServletRequest request)
Retrieves the URL path to use for lookup and delegates to getHandlerMethodNameForUrlPath . |
protected abstract String |
getHandlerMethodNameForUrlPath(String urlPath)
Return a method name that can handle this request, based on the given lookup path. |
void |
setAlwaysUseFullPath(boolean alwaysUseFullPath)
Set if URL lookup should always use full path within current servlet context. |
void |
setUrlDecode(boolean urlDecode)
Set if context path and request URI should be URL-decoded. |
void |
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to use for resolution of lookup paths. |
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 AbstractUrlMethodNameResolver()
Method Detail |
---|
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
UrlPathHelper.setAlwaysUseFullPath(boolean)
public void setUrlDecode(boolean urlDecode)
Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
Note: Setting this to "true" requires JDK 1.4 if the encoding differs from the VM's platform default encoding, as JDK 1.3's URLDecoder class does not offer a way to specify the encoding.
UrlPathHelper.setUrlDecode(boolean)
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple MethodNameResolvers and HandlerMappings.
AbstractUrlHandlerMapping.setUrlPathHelper(org.springframework.web.util.UrlPathHelper)
public final String getHandlerMethodName(HttpServletRequest request) throws NoSuchRequestHandlingMethodException
getHandlerMethodNameForUrlPath
.
Converts null
values to NoSuchRequestHandlingMethodExceptions.
getHandlerMethodName
in interface MethodNameResolver
request
- current HTTP request
null
; throws exception if not resolvable.
NoSuchRequestHandlingMethodException
- if no handler method
can be found for the given requestgetHandlerMethodNameForUrlPath(java.lang.String)
protected abstract String getHandlerMethodNameForUrlPath(String urlPath)
getHandlerMethodName
.
urlPath
- the URL path to use for lookup,
according to the settings in this class
getHandlerMethodName(javax.servlet.http.HttpServletRequest)
,
setAlwaysUseFullPath(boolean)
,
setUrlDecode(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |