public final class VelocityPage extends Object
The template should be in classpath:
String text = new VelocityPage("com/foo/my-template.vm") .set("name", "John Doe") .toString();
At the moment all logging is forwarded to LOG4J. In Velocity 2.0 there
will be an adapter for SLF4J and we'll use it: Slf4jLogChute
.
The class is mutable and thread-safe.
Constructor and Description |
---|
VelocityPage(String res)
Public ctor, with absolute resource name in classpath.
|
public VelocityPage set(@NotNull String prop, Object value)
prop
- Name of the property to setvalue
- The value to usepublic VelocityPage set(@NotNull Map<String,Object> args)
args
- Map of argumentsCopyright © 2012–2013 jcabi.com. All rights reserved.