public class JspAwareRequestContext extends RequestContext
javax.servlet.jsp.PageContext
.
This context will detect a JSTL locale attribute in page/request/session/application scope, in addition to the fallback locale strategy provided by the base class.
getFallbackLocale()
DEFAULT_THEME_NAME, jstlPresent, WEB_APPLICATION_CONTEXT_ATTRIBUTE
Constructor and Description |
---|
JspAwareRequestContext(PageContext pageContext)
Create a new JspAwareRequestContext for the given page context,
using the request attributes for Errors retrieval.
|
JspAwareRequestContext(PageContext pageContext,
java.util.Map<java.lang.String,java.lang.Object> model)
Create a new JspAwareRequestContext for the given page context,
using the given model attributes for Errors retrieval.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Locale |
getFallbackLocale()
This implementation checks for a JSTL locale attribute
in page, request, session or application scope; if not found,
returns the
HttpServletRequest.getLocale() . |
protected PageContext |
getPageContext()
Return the underlying PageContext.
|
protected void |
initContext(PageContext pageContext,
java.util.Map<java.lang.String,java.lang.Object> model)
Initialize this context with the given page context,
using the given model attributes for Errors retrieval.
|
changeLocale, changeLocale, changeTheme, changeTheme, getBindStatus, getBindStatus, getContextPath, getContextUrl, getContextUrl, getDefaultHtmlEscape, getErrors, getErrors, getFallbackTheme, getFallbackTimeZone, getLocale, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessageSource, getModel, getModelObject, getPathToServlet, getQueryString, getRequest, getRequestDataValueProcessor, getRequestUri, getResponseEncodedHtmlEscape, getServletContext, getTheme, getThemeMessage, getThemeMessage, getThemeMessage, getThemeMessage, getThemeMessage, getThemeMessage, getThemeMessage, getTimeZone, getUrlPathHelper, getWebApplicationContext, initContext, isDefaultHtmlEscape, isResponseEncodedHtmlEscape, setDefaultHtmlEscape, setUrlPathHelper
public JspAwareRequestContext(PageContext pageContext)
pageContext
- current JSP page contextpublic JspAwareRequestContext(PageContext pageContext, java.util.Map<java.lang.String,java.lang.Object> model)
pageContext
- current JSP page contextmodel
- the model attributes for the current view
(can be null
, using the request attributes for Errors retrieval)protected void initContext(PageContext pageContext, java.util.Map<java.lang.String,java.lang.Object> model)
pageContext
- current JSP page contextmodel
- the model attributes for the current view
(can be null
, using the request attributes for Errors retrieval)protected final PageContext getPageContext()
protected java.util.Locale getFallbackLocale()
HttpServletRequest.getLocale()
.getFallbackLocale
in class RequestContext
null
)ServletRequest.getLocale()