Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting the Velocity context.
// create the context to set all the variables
final VelocityContext context = new VelocityContext();
// setup the context
context.put("user", new UserBean("bill"));
context.put("site", "www.sop4j.com");
context.put("articles", Arrays.asList(new ArticleBean("Welcome"),
new ArticleBean("Parsing the Command Line"),
new ArticleBean("Document Templating or Mail Merge")));
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.