protected HttpServletRequest getRequestToExpose(HttpServletRequest originalRequest) { if (this.exposeContextBeansAsAttributes || this.exposedContextBeanNames != null) return new ContextExposingHttpServletRequest(originalRequest, getWebApplicationContext(), this.exposedContextBeanNames); return originalRequest; }
/** * Get the request handle to expose to {@link #renderMergedOutputModel}, i.e. to the view. * <p>The default implementation wraps the original request for exposure of Spring beans * as request attributes (if demanded). * @param originalRequest the original servlet request as provided by the engine * @return the wrapped request, or the original request if no wrapping is necessary * @see #setExposeContextBeansAsAttributes * @see #setExposedContextBeanNames * @see org.springframework.web.context.support.ContextExposingHttpServletRequest */ protected HttpServletRequest getRequestToExpose(HttpServletRequest originalRequest) { if (this.exposeContextBeansAsAttributes || this.exposedContextBeanNames != null) { return new ContextExposingHttpServletRequest( originalRequest, getWebApplicationContext(), this.exposedContextBeanNames); } return originalRequest; }
/** * Get the request handle to expose to the RequestDispatcher, i.e. to the view. * <p>The default implementation wraps the original request for exposure of * Spring beans as request attributes (if demanded). * @param originalRequest the original servlet request as provided by the engine * @return the wrapped request, or the original request if no wrapping is necessary * @see #setExposeContextBeansAsAttributes * @see org.springframework.web.context.support.ContextExposingHttpServletRequest */ protected HttpServletRequest getRequestToExpose(HttpServletRequest originalRequest) { if (this.exposeContextBeansAsAttributes || this.exposedContextBeanNames != null) { return new ContextExposingHttpServletRequest( originalRequest, getWebApplicationContext(), this.exposedContextBeanNames); } return originalRequest; }