|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.support.RequestContextUtils
Utility class for easy access to various request-specific state, set by the DispatcherServlet.
Constructor Summary | |
RequestContextUtils()
|
Method Summary | |
static java.util.Locale |
getLocale(javax.servlet.http.HttpServletRequest request)
Retrieves the current locale from the given request, using the LocaleResolver bound to the request by the DispatcherServlet. |
static LocaleResolver |
getLocaleResolver(javax.servlet.http.HttpServletRequest request)
Return the LocaleResolver that has been bound to the request by the DispatcherServlet. |
static MultipartResolver |
getMultipartResolver(javax.servlet.http.HttpServletRequest request)
Return the MultipartResolver that has been bound to the request by the DispatcherServlet. |
static Theme |
getTheme(javax.servlet.http.HttpServletRequest request)
Retrieves the current theme from the given request, using the ThemeResolver bound to the request by the DispatcherServlet, and the current WebApplicationContext. |
static ThemeResolver |
getThemeResolver(javax.servlet.http.HttpServletRequest request)
Return the ThemeResolver that has been bound to the request by the DispatcherServlet. |
static WebApplicationContext |
getWebApplicationContext(javax.servlet.ServletRequest request)
Look for the WebApplicationContext associated with the controller servlet that has initiated request processing. |
static WebApplicationContext |
getWebApplicationContext(javax.servlet.ServletRequest request,
javax.servlet.ServletContext servletContext)
Look for the WebApplicationContext associated with the controller servlet that has initiated request processing, and for the global context if none was found associated with the current request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RequestContextUtils()
Method Detail |
public static WebApplicationContext getWebApplicationContext(javax.servlet.ServletRequest request) throws java.lang.IllegalStateException
request
- current HTTP request
java.lang.IllegalStateException
- if neither a servlet-specific nor global context has been foundpublic static WebApplicationContext getWebApplicationContext(javax.servlet.ServletRequest request, javax.servlet.ServletContext servletContext) throws java.lang.IllegalStateException
request
- current HTTP requestservletContext
- current servlet context
java.lang.IllegalStateException
- if neither a servlet-specific nor global context has been foundpublic static LocaleResolver getLocaleResolver(javax.servlet.http.HttpServletRequest request) throws java.lang.IllegalStateException
request
- current HTTP request
java.lang.IllegalStateException
- if no LocaleResolver has been foundpublic static java.util.Locale getLocale(javax.servlet.http.HttpServletRequest request) throws java.lang.IllegalStateException
request
- current HTTP request
java.lang.IllegalStateException
- if no LocaleResolver has been foundpublic static ThemeResolver getThemeResolver(javax.servlet.http.HttpServletRequest request) throws java.lang.IllegalStateException
request
- current HTTP request
java.lang.IllegalStateException
- if no ThemeResolver has been foundpublic static Theme getTheme(javax.servlet.http.HttpServletRequest request) throws java.lang.IllegalStateException
request
- current HTTP request
java.lang.IllegalStateException
- if no ThemeResolver has been foundpublic static MultipartResolver getMultipartResolver(javax.servlet.http.HttpServletRequest request)
request
- current HTTP request
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |