Velocity Template Hello World
Apache Velocity is an open source software project which is hosted by Apache Software Foundation. This template engine provides a template language based on java to reference objects defined in Java code. It basically aims to keep clean separation between view tier and model tiers in a Web based application (in MVC design pattern). Below is sample code which will render velocity template file and print Hello World on the console.
- Maven Project structure:
- HelloWold.vm template:
- For more details on Apache Velocity please read it official tutorial here
Download project: SendEmailVelocityTemplate