接口的使用
org.apache.velocity.tools.view.JeeConfig
-
org.apache.velocity.tools.view中JeeConfig的使用
修饰符和类型类说明classImplementsJeeConfigwith only aServletContext.classImplementsJeeConfigwith aFilterConfig.classImplementsJeeConfigwith aServletConfig.参数类型为JeeConfig的org.apache.velocity.tools.view中的方法修饰符和类型方法说明protected voidprotected voidVelocityView.configure(JeeConfig config, ToolboxFactory factory) Here's the configuration lookup/loading order: If loadDefaults is true,ConfigurationUtils.getDefaultTools()Config file optionally specified by servletContextorg.apache.velocity.toolsinit-param Config file optionally at/WEB-INF/tools.xml(conventional location) Config file optionally specified by servletorg.apache.velocity.toolsinit-param Remember that as these configurations are added on top of each other, the newer values will always override the older ones.static VelocityViewServletUtils.getVelocityView(JeeConfig config) Returns the sharedVelocityViewfor the specifiedJeeConfig's context.protected voidInitializes ToolboxFactory, VelocityEngine, and sets default encoding for processing requests.protected voidInitializes the Velocity runtime, first calling loadConfiguration(JeeConfig) to get a java.util.Properties of configuration information and then calling velocityEngine.init().protected voidVelocityView.setEncoding(JeeConfig config) 参数类型为JeeConfig的org.apache.velocity.tools.view中的构造器