| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.springframework.context.support.ApplicationObjectSupport | +--org.springframework.web.context.support.WebApplicationObjectSupport | +--org.springframework.web.servlet.view.AbstractCachingViewResolver | +--org.springframework.web.servlet.view.UrlBasedViewResolver
Simple implementation of ViewResolver that allows for direct resolution of symbolic view names to URLs, without explicit mapping definition. This is appropriate if your symbolic names match the names of your view resources in a straightforward manner, without the need for arbitrary mappings.
Supports AbstractUrlBasedView subclasses like InternalResourceView and VelocityView. The view class for all views generated by this resolver can be specified via setViewClass.
View names can either be resource URLs themselves, or get augmented by a specified prefix and/or suffix. Exporting an attribute that holds the RequestContext to all views is explicitly supported.
Example: prefix="/WEB-INF/jsp/", suffix=".jsp", viewname="test" -> "/WEB-INF/jsp/test.jsp"
Note: This class does not support localized resolution, i.e. resolving a symbolic view name to different resources depending on the current locale.
Method Summary | |
void | setContentType(String contentType) Set the content type for all views. |
void | setPrefix(String prefix) Set the prefix that gets applied to view names when building a URL. |
void | setRequestContextAttribute(String requestContextAttribute) Set the name of the RequestContext attribute for all views. |
void | setSuffix(String suffix) Set the suffix that gets applied to view names when building a URL. |
void | setViewClass(Class viewClass) Set the view class that should be used to create views. |
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver |
isCache, resolveViewName, setCache |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
getApplicationContext, setApplicationContext |
Method Detail |
public void setContentType(String contentType)
public void setPrefix(String prefix)
public void setRequestContextAttribute(String requestContextAttribute)
public void setSuffix(String suffix)
public void setViewClass(Class viewClass)
Association Links |
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
to Class java.lang.String
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |