|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.context.support.ApplicationObjectSupport org.springframework.web.context.support.WebApplicationObjectSupport org.springframework.web.servlet.support.WebContentGenerator org.springframework.web.servlet.mvc.AbstractController org.springframework.web.servlet.mvc.AbstractUrlViewController
public abstract class AbstractUrlViewController
Abstract base class for Controllers that return a view name based on the URL.
Provides infrastructure for determining view names from URLs and configurable
URL lookup. For information on the latter, see alwaysUseFullPath
and urlDecode
properties.
setAlwaysUseFullPath(boolean)
,
setUrlDecode(boolean)
Field Summary |
---|
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
METHOD_GET, METHOD_HEAD, METHOD_POST |
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Constructor Summary | |
---|---|
AbstractUrlViewController()
|
Method Summary | |
---|---|
protected abstract String |
getViewNameForRequest(HttpServletRequest request)
Return the name of the view to render for this request, based on the given lookup path. |
protected ModelAndView |
handleRequestInternal(HttpServletRequest request,
HttpServletResponse response)
Retrieves the URL path to use for lookup and delegates to getViewNameForRequest . |
void |
setAlwaysUseFullPath(boolean alwaysUseFullPath)
Set if URL lookup should always use full path within current servlet context. |
void |
setUrlDecode(boolean urlDecode)
Set if context path and request URI should be URL-decoded. |
void |
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to use for resolution of lookup paths. |
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseExpiresHeader |
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
---|
getServletContext, getTempDir, getWebApplicationContext, isContextRequired, setServletContext |
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractUrlViewController()
Method Detail |
---|
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)
UrlPathHelper.setAlwaysUseFullPath(boolean)
public void setUrlDecode(boolean urlDecode)
Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).
Note: Setting this to "true" requires JDK 1.4 if the encoding differs from the VM's platform default encoding, as JDK 1.3's URLDecoder class does not offer a way to specify the encoding.
UrlPathHelper.setUrlDecode(boolean)
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple MethodNameResolvers and HandlerMappings.
AbstractUrlHandlerMapping.setUrlPathHelper(org.springframework.web.util.UrlPathHelper)
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
getViewNameForRequest
.
handleRequestInternal
in class AbstractController
getViewNameForRequest(javax.servlet.http.HttpServletRequest)
protected abstract String getViewNameForRequest(HttpServletRequest request)
handleRequestInternal
.
request
- current HTTP request
null
)handleRequestInternal(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
,
setAlwaysUseFullPath(boolean)
,
setUrlDecode(boolean)
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |