Package scriptella.driver.velocity


package scriptella.driver.velocity

Velocity Adapter for Scriptella.

This driver allows to integrate velocity templates into script files.

The content inside scipt elements managed by this driver is evaluated by Velocity engine and the output is sent to the URL specified as connection parameter.

General information

Driver class:scriptella.driver.velocity.Driver
URL:URL to send output to. URIs are resolved relative to a script file directory.
Runtime dependencies: velocity-engine-core.jar, commons-lang3.jar, slf4j-api.jar. These optional libraries are not bundled in the binary distribution. Supply all three with the connection classpath attribute. The examples distribution includes them for the packaged primes sample. This is Apache Velocity Engine 2.4.1; the old Velocity 1.x API is not supported by this release.

Driver Specific Properties

Name Description Required
encoding Character encoding for output streams. No, the JVM default charset is used.

Example

<connection driver="velocity" url="report.html"
            classpath="lib/velocity-engine-core.jar;lib/commons-lang3.jar;lib/slf4j-api.jar">
    encoding=UTF-8;
</connection>
Registers a velocity connection which renders its output to a file report.html in the same directory where the script file resides. UTF-8 is used to encode output.