/** * Expose helpers unique to each rendering operation. This is necessary so that * different rendering operations can't overwrite each other's formats etc. * <p>Called by {@code renderMergedTemplateModel}. Default implementation * delegates to {@code exposeHelpers(velocityContext, request)}. This method * can be overridden to add special tools to the context, needing the servlet response * to initialize (see Velocity Tools, for example LinkTool and ViewTool/ChainedContext). * @param velocityContext Velocity context that will be passed to the template * @param request current HTTP request * @param response current HTTP response * @throws Exception if there's a fatal error while we're adding model attributes * @see #exposeHelpers(Context, HttpServletRequest) */ protected void exposeHelpers( Context velocityContext, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeHelpers(velocityContext, request); }
/** * Expose helpers unique to each rendering operation. This is necessary so that * different rendering operations can't overwrite each other's formats etc. * <p>Called by {@code renderMergedTemplateModel}. Default implementation * delegates to {@code exposeHelpers(velocityContext, request)}. This method * can be overridden to add special tools to the context, needing the servlet response * to initialize (see Velocity Tools, for example LinkTool and ViewTool/ChainedContext). * @param velocityContext Velocity context that will be passed to the template * @param request current HTTP request * @param response current HTTP response * @throws Exception if there's a fatal error while we're adding model attributes * @see #exposeHelpers(Context, HttpServletRequest) */ protected void exposeHelpers( Context velocityContext, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeHelpers(velocityContext, request); }
/** * Expose helpers unique to each rendering operation. This is necessary so that * different rendering operations can't overwrite each other's formats etc. * <p>Called by {@code renderMergedTemplateModel}. Default implementation * delegates to {@code exposeHelpers(velocityContext, request)}. This method * can be overridden to add special tools to the context, needing the servlet response * to initialize (see Velocity Tools, for example LinkTool and ViewTool/ChainedContext). * @param velocityContext Velocity context that will be passed to the template * @param request current HTTP request * @param response current HTTP response * @throws Exception if there's a fatal error while we're adding model attributes * @see #exposeHelpers(org.apache.velocity.context.Context, HttpServletRequest) */ protected void exposeHelpers( Context velocityContext, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeHelpers(velocityContext, request); }
/** * Process the model map by merging it with the Velocity template. * Output is directed to the servlet response. * <p>This method can be overridden if custom behavior is needed. */ @Override protected void renderMergedTemplateModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeHelpers(model, request); Context velocityContext = createVelocityContext(model, request, response); exposeHelpers(velocityContext, request, response); exposeToolAttributes(velocityContext, request); doRender(velocityContext, response); }
/** * Process the model map by merging it with the Velocity template. * Output is directed to the servlet response. * <p>This method can be overridden if custom behavior is needed. */ @Override protected void renderMergedTemplateModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeHelpers(model, request); Context velocityContext = createVelocityContext(model, request, response); exposeHelpers(velocityContext, request, response); exposeToolAttributes(velocityContext, request); doRender(velocityContext, response); }
/** * Process the model map by merging it with the Velocity template. * Output is directed to the servlet response. * <p>This method can be overridden if custom behavior is needed. */ @Override protected void renderMergedTemplateModel( Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { exposeHelpers(model, request); Context velocityContext = createVelocityContext(model, request, response); exposeHelpers(velocityContext, request, response); exposeToolAttributes(velocityContext, request); doRender(velocityContext, response); }