org.springframework.web.servlet.view
Class XmlViewResolver

org.springframework.context.support.ApplicationObjectSupport
  |
  +--org.springframework.web.context.support.WebApplicationObjectSupport
        |
        +--org.springframework.web.servlet.view.AbstractCachingViewResolver
              |
              +--org.springframework.web.servlet.view.XmlViewResolver

public class XmlViewResolver
extends AbstractCachingViewResolver

Implementation of ViewResolver that uses bean definitions in an XML file, specified by location (URL or relative path, according to the ApplicationContext implementation). The file will typically be located in the WEB-INF directory.

This ViewResolver does not support internationalization. Consider ResourceBundleViewResolver if you need to apply different view resources per locale.

Extends AbstractCachingViewResolver for decent performance.

Author:
Juergen Hoeller
Since: 18.06.2003
See Also: org.springframework.context.ApplicationContext.getResource(java.lang.String), ResourceBundleViewResolver

Field Summary
 final static StringDEFAULT_LOCATION
          Default if no other location is supplied

Method Summary
 voidsetLocation(String location)
          Set the location of the XML file that defines the view beans.

Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
isCache, resolveViewName, setCache

Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, setApplicationContext

Field Detail

DEFAULT_LOCATION

public final static String DEFAULT_LOCATION
Default if no other location is supplied
Method Detail

setLocation

public void setLocation(String location)
Set the location of the XML file that defines the view beans.

The default is "/WEB-INF/views.xml".

Parameters:
location - the location of the XML file.

Association Links

to Class java.lang.String

Default if no other location is supplied

to Class java.lang.String

to Class org.springframework.beans.factory.BeanFactory