Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Merging Velocity context and template together.
// get the template
final Template template = velocity.getTemplate("my_template.vm");
final StringWriter sw = new StringWriter();
// merge the template and context
template.merge(context, sw);
// print out the resulting document
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment