类 JspAwareRequestContext


  • public class JspAwareRequestContext
    extends RequestContext
    JSP-aware (and JSTL-aware) subclass of RequestContext, allowing for population of the context from a 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.

    从以下版本开始:
    1.1.4
    作者:
    Juergen Hoeller
    另请参阅:
    getFallbackLocale()
    • 构造器详细资料

      • JspAwareRequestContext

        public JspAwareRequestContext​(PageContext pageContext)
        Create a new JspAwareRequestContext for the given page context, using the request attributes for Errors retrieval.
        参数:
        pageContext - current JSP page context
      • JspAwareRequestContext

        public JspAwareRequestContext​(PageContext pageContext,
                                      Map<String,​Object> model)
        Create a new JspAwareRequestContext for the given page context, using the given model attributes for Errors retrieval.
        参数:
        pageContext - current JSP page context
        model - the model attributes for the current view (can be null, using the request attributes for Errors retrieval)
    • 方法详细资料

      • initContext

        protected void initContext​(PageContext pageContext,
                                   Map<String,​Object> model)
        Initialize this context with the given page context, using the given model attributes for Errors retrieval.
        参数:
        pageContext - current JSP page context
        model - the model attributes for the current view (can be null, using the request attributes for Errors retrieval)
      • getPageContext

        protected final PageContext getPageContext()
        Return the underlying PageContext. Only intended for cooperating classes in this package.
      • getFallbackTimeZone

        protected TimeZone getFallbackTimeZone()
        This implementation checks for a JSTL time zone attribute in page, request, session or application scope; if not found, returns null.
        覆盖:
        getFallbackTimeZone 在类中 RequestContext
        返回:
        the fallback time zone (or null if none derivable from the request)