Java 类org.springframework.web.servlet.support.JspAwareRequestContext 实例源码

项目:spring4-understanding    文件:AbstractHtmlElementTagTests.java   
protected MockPageContext createAndPopulatePageContext() throws JspException {
    MockPageContext pageContext = createPageContext();
    MockHttpServletRequest request = (MockHttpServletRequest) pageContext.getRequest();
    StaticWebApplicationContext wac = (StaticWebApplicationContext) RequestContextUtils.findWebApplicationContext(request);
    wac.registerSingleton("requestDataValueProcessor", RequestDataValueProcessorWrapper.class);
    extendRequest(request);
    extendPageContext(pageContext);
    RequestContext requestContext = new JspAwareRequestContext(pageContext);
    pageContext.setAttribute(RequestContextAwareTag.REQUEST_CONTEXT_PAGE_ATTRIBUTE, requestContext);
    return pageContext;
}
项目:Telepathology    文件:AbstractApplicationContextBodyTagSupport.java   
/**
 * Return the current RequestContext.
 */
protected synchronized final RequestContext getRequestContext()
{
    if(this.requestContext == null)
    {
        this.requestContext = (RequestContext) this.pageContext.getAttribute(REQUEST_CONTEXT_PAGE_ATTRIBUTE);
        if (this.requestContext == null)
        {
            this.requestContext = new JspAwareRequestContext(this.pageContext);
            this.pageContext.setAttribute(REQUEST_CONTEXT_PAGE_ATTRIBUTE, this.requestContext);
        }
    }

    return this.requestContext;
}
项目:Telepathology    文件:AbstractApplicationContextTagSupport.java   
/**
 * Return the current RequestContext.
 */
protected synchronized final RequestContext getRequestContext()
{
    if(this.requestContext == null)
    {
        this.requestContext = (RequestContext) this.pageContext.getAttribute(REQUEST_CONTEXT_PAGE_ATTRIBUTE);
        if (this.requestContext == null)
        {
            this.requestContext = new JspAwareRequestContext(this.pageContext);
            this.pageContext.setAttribute(REQUEST_CONTEXT_PAGE_ATTRIBUTE, this.requestContext);
        }
    }

    return this.requestContext;
}
项目:Telepathology    文件:StudyImageListTag.java   
/**
 * Return the current RequestContext.
 */
protected synchronized final RequestContext getRequestContext()
{
    if(this.requestContext == null)
    {
        this.requestContext = (RequestContext) this.pageContext.getAttribute(REQUEST_CONTEXT_PAGE_ATTRIBUTE);
        if (this.requestContext == null)
        {
            this.requestContext = new JspAwareRequestContext(this.pageContext);
            this.pageContext.setAttribute(REQUEST_CONTEXT_PAGE_ATTRIBUTE, this.requestContext);
        }
    }

    return this.requestContext;
}
项目:class-guard    文件:AbstractHtmlElementTagTests.java   
protected MockPageContext createAndPopulatePageContext() throws JspException {
    MockPageContext pageContext = createPageContext();
    MockHttpServletRequest request = (MockHttpServletRequest) pageContext.getRequest();
    StaticWebApplicationContext wac = (StaticWebApplicationContext) RequestContextUtils.getWebApplicationContext(request);
    wac.registerSingleton("requestDataValueProcessor", RequestDataValueProcessorWrapper.class);
    extendRequest(request);
    extendPageContext(pageContext);
    RequestContext requestContext = new JspAwareRequestContext(pageContext);
    pageContext.setAttribute(RequestContextAwareTag.REQUEST_CONTEXT_PAGE_ATTRIBUTE, requestContext);
    return pageContext;
}
项目:spring-mvc-toolkit    文件:TestHtml5InputTag.java   
protected JspAwareRequestContext getRequestContext() {
    return (JspAwareRequestContext) pageContext.getAttribute(RequestContextAwareTag.REQUEST_CONTEXT_PAGE_ATTRIBUTE);
}
项目:spring-mvc-toolkit    文件:TestHtml5InputTag.java   
protected MockPageContext createAndPopulatePageContext(Map<String, Object> model) {
    MockPageContext pc = createPageContext();
    JspAwareRequestContext requestContext = new JspAwareRequestContext(pc, model);
    pc.setAttribute(RequestContextAwareTag.REQUEST_CONTEXT_PAGE_ATTRIBUTE, requestContext);
    return pc;
}