Controllers that return a view name
based on the request URL.
Provides infrastructure for determining view names from URLs and configurable
URL lookup. For information on the latter, see alwaysUseFullPath
and urlDecode properties.
setAlwaysUseFullPath, setUrlDecode
| Modifier and Type | Field and Description |
|---|---|
| private UrlPathHelper |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected UrlPathHelper | |
| protected abstract String | Returns: a view name for this request (nevernull)current HTTP request request)Return the name of the view to render for this request, based on the given lookup path. |
| protected ModelAndView | handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
Implements abstract org. Retrieves the URL path to use for lookup and delegates to
|
| public void | setAlwaysUseFullPath(boolean alwaysUseFullPath)
Set if URL lookup should always use full path within current servlet context. |
| public void | setRemoveSemicolonContent(boolean removeSemicolonContent)
Set if ";" (semicolon) content should be stripped from the request URI. |
| public void | |
| public void | setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to use for the resolution of lookup paths. |
| urlPathHelper | back to summary |
|---|---|
| private UrlPathHelper urlPathHelper | |
| AbstractUrlViewController | back to summary |
|---|---|
| public AbstractUrlViewController() | |
| getUrlPathHelper | back to summary |
|---|---|
| protected UrlPathHelper getUrlPathHelper() Return the UrlPathHelper to use for the resolution of lookup paths. | |
| getViewNameForRequest | back to summary |
|---|---|
| protected abstract String getViewNameForRequest(HttpServletRequest request) Return the name of the view to render for this request, based on the
given lookup path. Called by
| |
| handleRequestInternal | back to summary |
|---|---|
| protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) Implements abstract org. Retrieves the URL path to use for lookup and delegates to
| |
| setAlwaysUseFullPath | back to summary |
|---|---|
| public void setAlwaysUseFullPath(boolean alwaysUseFullPath) Set if URL lookup should always use full path within current servlet context. Else, the path within the current servlet mapping is used if applicable (i.e. in the case of a ".../*" servlet mapping in web.xml). Default is "false". | |
| setRemoveSemicolonContent | back to summary |
|---|---|
| public void setRemoveSemicolonContent(boolean removeSemicolonContent) Set if ";" (semicolon) content should be stripped from the request URI. | |
| setUrlDecode | back to summary |
|---|---|
| public void setUrlDecode(boolean urlDecode) Set if context path and request URI should be URL-decoded. Both are returned undecoded by the Servlet API, in contrast to the servlet path. Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1). | |
| setUrlPathHelper | back to summary |
|---|---|
| public void setUrlPathHelper(UrlPathHelper urlPathHelper) Set the UrlPathHelper to use for the resolution of lookup paths. Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple MethodNameResolvers and HandlerMappings. | |