org.springframework.boot.web.servlet.view.velocity

Class EmbeddedVelocityToolboxView

  • java.lang.Object
    • org.springframework.context.support.ApplicationObjectSupport
      • org.springframework.web.context.support.WebApplicationObjectSupport
        • org.springframework.web.servlet.view.AbstractView
          • org.springframework.web.servlet.view.AbstractUrlBasedView
            • org.springframework.web.servlet.view.AbstractTemplateView
              • org.springframework.web.servlet.view.velocity.VelocityView
                • org.springframework.web.servlet.view.velocity.VelocityToolboxView
                  • org.springframework.boot.web.servlet.view.velocity.EmbeddedVelocityToolboxView
  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.View


    public class EmbeddedVelocityToolboxView
    extends org.springframework.web.servlet.view.velocity.VelocityToolboxView
    Extended version of VelocityToolboxView that can load toolbox locations from the classpath as well as the servlet context. This is useful when run an embedded web server.
    Since:
    1.2.5
    Author:
    Phillip Webb
    • Field Summary

      • Fields inherited from class org.springframework.web.servlet.view.AbstractTemplateView

        SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE
      • Fields inherited from class org.springframework.web.servlet.view.AbstractView

        DEFAULT_CONTENT_TYPE
      • Fields inherited from class org.springframework.context.support.ApplicationObjectSupport

        logger
      • Fields inherited from interface org.springframework.web.servlet.View

        PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      protected org.apache.velocity.context.Context createVelocityContext(Map<String,Object> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) 
      • Methods inherited from class org.springframework.web.servlet.view.velocity.VelocityToolboxView

        getToolboxConfigLocation, initTool, setToolboxConfigLocation
      • Methods inherited from class org.springframework.web.servlet.view.velocity.VelocityView

        autodetectVelocityEngine, checkResource, createVelocityContext, doRender, exposeHelpers, exposeHelpers, exposeHelpers, exposeToolAttributes, getEncoding, getTemplate, getTemplate, getVelocityEngine, initApplicationContext, isCacheTemplate, mergeTemplate, renderMergedTemplateModel, setCacheTemplate, setDateToolAttribute, setEncoding, setNumberToolAttribute, setToolAttributes, setVelocityEngine
      • Methods inherited from class org.springframework.web.servlet.view.AbstractTemplateView

        applyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
      • Methods inherited from class org.springframework.web.servlet.view.AbstractUrlBasedView

        afterPropertiesSet, getUrl, isUrlRequired, setUrl, toString
      • Methods inherited from class org.springframework.web.servlet.view.AbstractView

        addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse
      • Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport

        getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
      • Methods inherited from class org.springframework.context.support.ApplicationObjectSupport

        getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
    • Constructor Detail

      • EmbeddedVelocityToolboxView

        public EmbeddedVelocityToolboxView()
    • Method Detail

      • createVelocityContext

        protected org.apache.velocity.context.Context createVelocityContext(Map<String,Object> model,
                                                                            javax.servlet.http.HttpServletRequest request,
                                                                            javax.servlet.http.HttpServletResponse response)
                                                                     throws Exception
        Overrides:
        createVelocityContext in class org.springframework.web.servlet.view.velocity.VelocityToolboxView
        Throws:
        Exception

Copyright © 2015 Pivotal Software, Inc.. All rights reserved.