站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

FreeMarkerViewResolver (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.web.servlet.view.freemarker
Class FreeMarkerViewResolver

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.view.AbstractCachingViewResolver
              extended by org.springframework.web.servlet.view.UrlBasedViewResolver
                  extended by org.springframework.web.servlet.view.AbstractTemplateViewResolver
                      extended by org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver
All Implemented Interfaces:
ApplicationContextAware, ViewResolver

public class FreeMarkerViewResolver
extends AbstractTemplateViewResolver

Convenience subclass of UrlBasedViewResolver that supports FreeMarkerView (i.e. FreeMarker templates) and custom subclasses of it.

The view class for all views generated by this resolver can be specified via setViewClass. See UrlBasedViewResolver's javadoc for details.

Note: When chaining ViewResolvers, a FreeMarkerViewResolver always needs to be last, as it will attempt to resolve any view name, no matter whether the underlying resource actually exists.

Since:
1.1
Author:
Juergen Hoeller
See Also:
UrlBasedViewResolver.setViewClass(java.lang.Class), UrlBasedViewResolver.setPrefix(java.lang.String), UrlBasedViewResolver.setSuffix(java.lang.String), UrlBasedViewResolver.setRequestContextAttribute(java.lang.String), AbstractTemplateViewResolver.setExposeSpringMacroHelpers(boolean), FreeMarkerView

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
FreeMarkerViewResolver()
          Sets default viewClass to requiredViewClass.
 
Method Summary
protected  Class requiredViewClass()
          Requires FreeMarkerView.
 
Methods inherited from class org.springframework.web.servlet.view.AbstractTemplateViewResolver
buildView, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
 
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver
createView, getAttributesMap, getCacheKey, getContentType, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, isCache, removeFromCache, resolveViewName, setCache
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeMarkerViewResolver

public FreeMarkerViewResolver()
Sets default viewClass to requiredViewClass.

See Also:
UrlBasedViewResolver.setViewClass(java.lang.Class), requiredViewClass()
Method Detail

requiredViewClass

protected Class requiredViewClass()
Requires FreeMarkerView.

Overrides:
requiredViewClass in class AbstractTemplateViewResolver
See Also:
FreeMarkerView


Copyright (c) 2002-2007 The Spring Framework Project.