Skip to content

Instantly share code, notes, and snippets.

Embed
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
System.out.println(sw.toString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.