public class ScriptTemplateViewResolver extends UrlBasedViewResolver
UrlBasedViewResolver that supports
ScriptTemplateView and custom subclasses of it.
The view class for all views created by this resolver can be specified
via the UrlBasedViewResolver.setViewClass(Class) property.
Note: When chaining ViewResolvers this resolver will check for the existence of the specified template resources and only return a non-null View object if a template is actually found.
ScriptTemplateConfigurerFORWARD_URL_PREFIX, REDIRECT_URL_PREFIXDEFAULT_CACHE_LIMIT| Constructor and Description |
|---|
ScriptTemplateViewResolver()
|
ScriptTemplateViewResolver(String prefix,
String suffix)
|
| Modifier and Type | Method and Description |
|---|---|
protected Class<?> |
requiredViewClass()
Return the required type of view for this resolver.
|
View |
resolveViewName(String viewName,
Locale locale)
Resolve the given view by name.
|
applyLifecycleMethods, buildView, canHandle, createView, getAttributesMap, getCacheKey, getContentType, getExposeContextBeansAsAttributes, getExposedContextBeanNames, getExposePathVariables, getOrder, getPrefix, getRedirectHosts, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHosts, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNamesclearCache, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, setCache, setCacheLimit, setCacheUnresolvedgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextpublic View resolveViewName(String viewName, Locale locale) throws Exception
ViewResolverNote: To allow for ViewResolver chaining, a ViewResolver should
return null if a view with the given name is not defined in it.
However, this is not required: Some ViewResolvers will always attempt
to build View objects with the given name, unable to return null
(rather throwing an exception when View creation failed).
resolveViewName in interface ViewResolverresolveViewName in class AbstractCachingViewResolverviewName - name of the view to resolvelocale - Locale in which to resolve the view.
ViewResolvers that support internationalization should respect this.null if not found
(optional, to allow for ViewResolver chaining)Exception - if the view cannot be resolved
(typically in case of problems creating an actual View object)protected Class<?> requiredViewClass()
UrlBasedViewResolverrequiredViewClass in class UrlBasedViewResolverAbstractUrlBasedView