Created
January 20, 2013 17:15
-
-
Save wspeirs/4579956 to your computer and use it in GitHub Desktop.
Setting the Velocity context.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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