Class AbstractUrlViewController
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.springframework.web.servlet.mvc.AbstractController
org.springframework.web.servlet.mvc.AbstractUrlViewController
- All Implemented Interfaces:
- Aware,- ApplicationContextAware,- ServletContextAware,- Controller
- Direct Known Subclasses:
- UrlFilenameViewController
Abstract base class for 
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.
- Since:
- 1.2.6
- Author:
- Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from class org.springframework.web.servlet.support.WebContentGeneratorHEADER_CACHE_CONTROL, METHOD_GET, METHOD_HEAD, METHOD_POSTFields inherited from class org.springframework.context.support.ApplicationObjectSupportlogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected UrlPathHelperDeprecated, for removal: This API element is subject to removal in a future version.protected abstract StringgetViewNameForRequest(HttpServletRequest request) Return the name of the view to render for this request, based on the given lookup path.protected ModelAndViewhandleRequestInternal(HttpServletRequest request, HttpServletResponse response) Retrieves the URL path to use for lookup and delegates togetViewNameForRequest(jakarta.servlet.http.HttpServletRequest).voidsetAlwaysUseFullPath(boolean alwaysUseFullPath) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.voidsetRemoveSemicolonContent(boolean removeSemicolonContent) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.voidsetUrlDecode(boolean urlDecode) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.voidsetUrlPathHelper(UrlPathHelper urlPathHelper) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.Methods inherited from class org.springframework.web.servlet.mvc.AbstractControllerhandleRequest, isSynchronizeOnSession, setSynchronizeOnSessionMethods inherited from class org.springframework.web.servlet.support.WebContentGeneratorapplyCacheControl, applyCacheSeconds, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isRequireSession, prepareResponse, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setVaryByRequestHeadersMethods inherited from class org.springframework.web.context.support.WebApplicationObjectSupportgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextMethods inherited from class org.springframework.context.support.ApplicationObjectSupportgetApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
- 
Constructor Details- 
AbstractUrlViewControllerpublic AbstractUrlViewController()
 
- 
- 
Method Details- 
setAlwaysUseFullPath@Deprecated(since="7.0", forRemoval=true) public void setAlwaysUseFullPath(boolean alwaysUseFullPath) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.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".
- 
setUrlDecodeDeprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.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). - See Also:
 
- 
setRemoveSemicolonContent@Deprecated(since="7.0", forRemoval=true) public void setRemoveSemicolonContent(boolean removeSemicolonContent) Deprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.Set if ";" (semicolon) content should be stripped from the request URI.
- 
setUrlPathHelperDeprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.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. 
- 
getUrlPathHelperDeprecated, for removal: This API element is subject to removal in a future version.use ofPathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.Return the UrlPathHelper to use for the resolution of lookup paths.
- 
handleRequestInternalprotected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) Retrieves the URL path to use for lookup and delegates togetViewNameForRequest(jakarta.servlet.http.HttpServletRequest). Also adds the content ofRequestContextUtils.getInputFlashMap(jakarta.servlet.http.HttpServletRequest)to the model.
- 
getViewNameForRequestReturn the name of the view to render for this request, based on the given lookup path. Called byhandleRequestInternal(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse).- Parameters:
- request- current HTTP request
- Returns:
- a view name for this request (never null)
- See Also:
 
 
- 
PathMatcherandUrlPathHelperis deprecated for use at runtime in web modules in favor of parsed patterns withPathPatternParser.