Class TilesView
- All Implemented Interfaces:
Aware
,BeanNameAware
,InitializingBean
,ApplicationContextAware
,ServletContextAware
,View
@Deprecated public class TilesView extends AbstractUrlBasedView
Deprecated.as of Spring 4.2, in favor of Tiles 3View
implementation that retrieves a Tiles definition. The "url" property is interpreted as name of a Tiles definition.This class builds on Tiles, which requires JSP 2.0. JSTL support is integrated out of the box due to JSTL's inclusion in JSP 2.0. Note: Spring 4.0 requires Tiles 2.2.2.
Depends on a TilesContainer which must be available in the ServletContext. This container is typically set up via a
TilesConfigurer
bean definition in the application context.NOTE: Tiles 2 support is deprecated in favor of Tiles 3 and will be removed as of Spring Framework 5.0..
- Since:
- 2.5
- Author:
- Juergen Hoeller, Sebastien Deleuze
- See Also:
AbstractUrlBasedView.setUrl(java.lang.String)
,TilesConfigurer
Field Summary
Fields inherited from class org.springframework.web.servlet.view.AbstractView
DEFAULT_CONTENT_TYPE
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
Fields inherited from interface org.springframework.web.servlet.View
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
Constructor Summary
Constructors Constructor Description TilesView()
Deprecated.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
checkResource(Locale locale)
Deprecated.Check whether the underlying resource that the configured URL points to actually exists.protected void
renderMergedOutputModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response)
Deprecated.Subclasses must implement this method to actually render the view.void
setAlwaysInclude(boolean alwaysInclude)
Deprecated.Specify whether to always include the view rather than forward to it.Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView
afterPropertiesSet, getUrl, isUrlRequired, setUrl, toString
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
Constructor Detail
TilesView
public TilesView()
Deprecated.
Method Detail
setAlwaysInclude
public void setAlwaysInclude(boolean alwaysInclude)
Deprecated.Specify whether to always include the view rather than forward to it.Default is "false". Switch this flag on to enforce the use of a Servlet include, even if a forward would be possible.
- Since:
- 4.1.2
- See Also:
TilesViewResolver.setAlwaysInclude(java.lang.Boolean)
checkResource
public boolean checkResource(Locale locale) throws Exception
Deprecated.Description copied from class:AbstractUrlBasedView
Check whether the underlying resource that the configured URL points to actually exists.- Overrides:
checkResource
in classAbstractUrlBasedView
- Parameters:
locale
- the desired Locale that we're looking for- Returns:
true
if the resource exists (or is assumed to exist);false
if we know that it does not exist- Throws:
Exception
- if the resource exists but is invalid (e.g. could not be parsed)
renderMergedOutputModel
protected void renderMergedOutputModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception
Deprecated.Description copied from class:AbstractView
Subclasses must implement this method to actually render the view.The first step will be preparing the request: In the JSP case, this would mean setting model objects as request attributes. The second step will be the actual rendering of the view, for example including the JSP via a RequestDispatcher.
- Specified by:
renderMergedOutputModel
in classAbstractView
- Parameters:
model
- combined output Map (nevernull
), with dynamic values taking precedence over static attributesrequest
- current HTTP requestresponse
- current HTTP response- Throws:
Exception
- if rendering failed