@Override public String getPage() { return oldDecorator.getPage(); }
protected void render(Content content, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext, SiteMeshWebAppContext webAppContext) throws IOException, ServletException { request.setAttribute(PAGE, new Content2HTMLPage(content, request)); // see if the URI path (webapp) is set if (oldDecorator.getURIPath() != null) { // in a security conscious environment, the servlet container // may return null for a given URL if (servletContext.getContext(oldDecorator.getURIPath()) != null) { servletContext = servletContext.getContext(oldDecorator.getURIPath()); } } // get the dispatcher for the decorator RequestDispatcher dispatcher = servletContext.getRequestDispatcher(oldDecorator.getPage()); dispatcher.include(request, response); request.removeAttribute(PAGE); }
public Decorator getDecorator(HttpServletRequest request, Page page) { try { Decorator result = null; final Decorator d = super.getDecorator(request, page); String path = modifyPath(d.getPage(), getExt(request.getHeader("Accept-Language"))); File decFile = new File(config.getServletContext().getRealPath(path)); if (decFile.isFile()) { result = new DefaultDecorator(d.getName(), path, null) { public String getInitParameter(String paramName) { return d.getInitParameter(paramName); } }; } return result == null ? super.getDecorator(request, page) : result; } catch (NullPointerException e) { return super.getDecorator(request, page); } }
public Decorator getDecorator(HttpServletRequest request, Page page) { try { Decorator result = null; final Decorator d = super.getDecorator(request, page); String path = modifyPath(d.getPage(), getExt(request.getHeader("User-Agent"))); File decFile = new File(config.getServletContext().getRealPath(path)); if (decFile.isFile()) { result = new DefaultDecorator(d.getName(), path, null) { public String getInitParameter(String paramName) { return d.getInitParameter(paramName); } }; } return result == null ? super.getDecorator(request, page) : result; } catch (NullPointerException e) { return super.getDecorator(request, page); } }
public com.opensymphony.sitemesh.Decorator selectDecorator(Content content, SiteMeshContext context) { SiteMeshWebAppContext webAppContext = (SiteMeshWebAppContext) context; HttpServletRequest request = webAppContext.getRequest(); com.opensymphony.module.sitemesh.Decorator decorator = decoratorMapper.getDecorator(request, new Content2HTMLPage(content, request)); if (decorator == null || decorator.getPage() == null) { return new NoDecorator(); } else { return new OldDecorator2NewStrutsFreemarkerDecorator(decorator); } } }
public com.opensymphony.sitemesh.Decorator selectDecorator(Content content, SiteMeshContext context) { SiteMeshWebAppContext webAppContext = (SiteMeshWebAppContext) context; HttpServletRequest request = webAppContext.getRequest(); Decorator decorator = decoratorMapper.getDecorator(request, new Content2HTMLPage(content, request)); if (decorator == null || decorator.getPage() == null) { return new NoDecorator(); } else { return new OldDecorator2NewStrutsVelocityDecorator(decorator); } } }
public Decorator selectDecorator(Content content, SiteMeshContext context) { SiteMeshWebAppContext webAppContext = (SiteMeshWebAppContext) context; HttpServletRequest request = webAppContext.getRequest(); com.opensymphony.module.sitemesh.Decorator decorator = decoratorMapper.getDecorator(request, new Content2HTMLPage(content, request)); if (decorator == null || decorator.getPage() == null) { return new NoDecorator(); } else { return new OldDecorator2NewDecorator(decorator); } } }
org.apache.velocity.Template template = velocityManager.getVelocityEngine().getTemplate(oldDecorator.getPage(), encoding); Context context = velocityManager.createContext(ctx.getValueStack(), request, response);
Template template = vm.getVelocityEngine().getTemplate(decorator.getPage(), encoding); Context context = vm.createContext(ctx.getValueStack(), req, res);
Template template = config.getTemplate(oldDecorator.getPage(), getLocale(ctx.getActionInvocation(), config)); // WW-1181
DecoratorMapper decoratorMapper = getDecoratorMapper(); Decorator decorator = decoratorMapper.getDecorator(request, htmlPage); template = decorator.getPage();
DecoratorMapper decoratorMapper = getDecoratorMapper(); Decorator decorator = decoratorMapper.getDecorator(request, htmlPage); template = decorator.getPage();
Template template = config.getTemplate(decorator.getPage(), getLocale(ctx.getActionInvocation(), config)); // WW-1181
Template template = getFreemarkerTemplate(decorator.getPage()); SimpleHash model = createModel(); model.put("page", pageObject);