Java Code Examples for org.springframework.web.servlet.support.JstlUtils#exposeLocalizationContext()
The following examples show how to use
org.springframework.web.servlet.support.JstlUtils#exposeLocalizationContext() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TilesView.java From spring-analysis-note with MIT License | 6 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { Assert.state(this.renderer != null, "No Renderer set"); exposeModelAsRequestAttributes(model, request); if (this.exposeJstlAttributes) { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } if (this.alwaysInclude) { request.setAttribute(AbstractRequest.FORCE_INCLUDE_ATTRIBUTE_NAME, true); } Request tilesRequest = createTilesRequest(request, response); this.renderer.render(getUrl(), tilesRequest); }
Example 2
Source File: TilesView.java From java-technology-stack with MIT License | 6 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { Assert.state(this.renderer != null, "No Renderer set"); exposeModelAsRequestAttributes(model, request); if (this.exposeJstlAttributes) { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } if (this.alwaysInclude) { request.setAttribute(AbstractRequest.FORCE_INCLUDE_ATTRIBUTE_NAME, true); } Request tilesRequest = createTilesRequest(request, response); this.renderer.render(getUrl(), tilesRequest); }
Example 3
Source File: TilesView.java From lams with GNU General Public License v2.0 | 6 votes |
@Override protected void renderMergedOutputModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { ServletContext servletContext = getServletContext(); TilesContainer container = ServletUtil.getContainer(servletContext); if (container == null) { throw new ServletException("Tiles container is not initialized. " + "Have you added a TilesConfigurer to your web application context?"); } exposeModelAsRequestAttributes(model, request); JstlUtils.exposeLocalizationContext(new RequestContext(request, servletContext)); if (this.alwaysInclude) { ServletUtil.setForceInclude(request, true); } container.render(getUrl(), request, response); }
Example 4
Source File: TilesView.java From spring4-understanding with Apache License 2.0 | 6 votes |
@Override protected void renderMergedOutputModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { ServletContext servletContext = getServletContext(); TilesContainer container = ServletUtil.getContainer(servletContext); if (container == null) { throw new ServletException("Tiles container is not initialized. " + "Have you added a TilesConfigurer to your web application context?"); } exposeModelAsRequestAttributes(model, request); JstlUtils.exposeLocalizationContext(new RequestContext(request, servletContext)); if (this.alwaysInclude) { ServletUtil.setForceInclude(request, true); } container.render(getUrl(), request, response); }
Example 5
Source File: JstlView.java From spring-analysis-note with MIT License | 5 votes |
/** * Exposes a JSTL LocalizationContext for Spring's locale and MessageSource. * @see JstlUtils#exposeLocalizationContext */ @Override protected void exposeHelpers(HttpServletRequest request) throws Exception { if (this.messageSource != null) { JstlUtils.exposeLocalizationContext(request, this.messageSource); } else { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } }
Example 6
Source File: JstlView.java From java-technology-stack with MIT License | 5 votes |
/** * Exposes a JSTL LocalizationContext for Spring's locale and MessageSource. * @see JstlUtils#exposeLocalizationContext */ @Override protected void exposeHelpers(HttpServletRequest request) throws Exception { if (this.messageSource != null) { JstlUtils.exposeLocalizationContext(request, this.messageSource); } else { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } }
Example 7
Source File: TilesView.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeModelAsRequestAttributes(model, request); if (this.exposeJstlAttributes) { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } if (this.alwaysInclude) { request.setAttribute(AbstractRequest.FORCE_INCLUDE_ATTRIBUTE_NAME, true); } Request tilesRequest = createTilesRequest(request, response); this.renderer.render(getUrl(), tilesRequest); }
Example 8
Source File: JstlView.java From lams with GNU General Public License v2.0 | 5 votes |
/** * Exposes a JSTL LocalizationContext for Spring's locale and MessageSource. * @see JstlUtils#exposeLocalizationContext */ @Override protected void exposeHelpers(HttpServletRequest request) throws Exception { if (this.messageSource != null) { JstlUtils.exposeLocalizationContext(request, this.messageSource); } else { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } }
Example 9
Source File: TilesView.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeModelAsRequestAttributes(model, request); if (this.exposeJstlAttributes) { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } if (this.alwaysInclude) { request.setAttribute(AbstractRequest.FORCE_INCLUDE_ATTRIBUTE_NAME, true); } Request tilesRequest = createTilesRequest(request, response); this.renderer.render(getUrl(), tilesRequest); }
Example 10
Source File: JstlView.java From spring4-understanding with Apache License 2.0 | 5 votes |
/** * Exposes a JSTL LocalizationContext for Spring's locale and MessageSource. * @see JstlUtils#exposeLocalizationContext */ @Override protected void exposeHelpers(HttpServletRequest request) throws Exception { if (this.messageSource != null) { JstlUtils.exposeLocalizationContext(request, this.messageSource); } else { JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext())); } }