Skip to content
Mohammad Badar Hashimi edited this page Jan 26, 2020 · 2 revisions

Apache Velocity Template Engine Library for Anar Framework

Usage Guide

		<dependency>
	               <groupId>af.gov.anar.lib</groupId>
	                <artifactId>anar-lib-velocitytemplate</artifactId>
                        <version>${project.version}</version>
		</dependency>

Apache Velocity

Velocity is a template engine that can be used for many purposes. Some common types of applications which use Velocity are:

  • Web applications. Web designers create HTML pages with placeholders for dynamic information. The page is processed with VelocityViewServlet or any of a number of frameworks which support Velocity. This approach to web application development is called Model-View-Controller or MVC and is intended to be a direct replacement for applications developed with Java Server Pages (JSPs) or PHP.
  • Source code generation. Velocity can be used to generate Java source code, SQL, or PostScript based on templates. The PoweredByVelocity page lists a number of open source and commercial development software packages which use Velocity in this manner.
  • Automatic emails. Many applications generate automatic emails for account signup, password reminders or automatically sent reports. Using Velocity, the email template can be stored in a text file rather than directly embedded in your Java code.
  • XML transformation. Velocity provides an ant task called Anakia which reads an XML file and makes it available to a Velocity template. A common application is to convert documentation stored in a generic "xdoc" format into a styled HTML document.
Clone this wiki locally