diff --git a/projects/samskivert/src/java/com/samskivert/velocity/Application.java b/projects/samskivert/src/java/com/samskivert/velocity/Application.java index 02f043c5..1713f271 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/Application.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/Application.java @@ -20,6 +20,8 @@ package com.samskivert.velocity; +import java.util.Properties; + import javax.servlet.ServletConfig; import javax.servlet.ServletContext; @@ -125,6 +127,14 @@ public class Application didInit(config); } + /** + * Called prior to initializing Velocity to allow the application to + * specify custom configuration properties. + */ + protected void configureVelocity (ServletConfig config, Properties props) + { + } + /** * Looks up an initialization parameter for this application. The * default implementation retrieves the value from the servlet config, diff --git a/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java b/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java index 151c6edd..5bd4af9c 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java @@ -243,6 +243,9 @@ public class DispatcherServlet extends VelocityServlet props.setProperty(RuntimeSingleton.RUNTIME_LOG_LOGSYSTEM_CLASS, ServletContextLogger.class.getName()); + // let the application set up other properties + _app.configureVelocity(config, props); + // now return our augmented properties return props; }