Created
January 20, 2013 17:12
-
-
Save wspeirs/4579933 to your computer and use it in GitHub Desktop.
Configuring the Velocity engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create the velocity engine | |
final VelocityEngine velocity = new VelocityEngine(); | |
// set the logger to our Log4J root logger | |
velocity.setProperty("runtime.log.logsystem.log4j.logger", "root"); | |
// use the resource loader as it's easy with Maven's path setup | |
velocity.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath"); | |
velocity.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName()); | |
// make sure to call init before using the engine | |
velocity.init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment