Apache Velocity
Apache Velocity first released in April 2001, is a Java-based template engine that provides a template language to reference objects defined in Java code.[src] It aims to ensure clean separation between the presentation tier and business tiers in a Web application (the model–view–controller design pattern).[src] Velocity is an open source software project hosted by the Apache Software Foundation.[src] It is released under the Apache License.[src] Jon Scott Stevens derived the name from the AltiVec Velocity Engine in the PowerPC G4 chip.[src]
Apache Velocity first released in April 2001, is a Java-based template engine that provides a template language to reference objects defined in Java code.[src] It aims to ensure clean separation between the presentation tier and business tiers in a Web application (the model–view–controller design pattern).[src] Velocity is an open source software project hosted by the Apache Software Foundation.[src] It is released under the Apache License.[src] Jon Scott Stevens derived the name from the AltiVec Velocity Engine in the PowerPC G4 chip.[src] Velocity Hello World #set( $foo = "Velocity" ) ## followed by Hello $foo World![src] processed by Velocity produces the following HTML: Hello Velocity World![src] Another example using conditions: if( $foo AWS API Gateway body mapping template, for DynamoDB HTTP: { "TableName": "happy-marketer", "KeyConditionExpression": "pk = :pk AND begins_with(sk, :sk)", #if ($input.params('projectStatus') == 'archived') "FilterExpression": "projectStatus = :Archived", #else "FilterExpression": "projectStatus = :InProgress OR projectStatus = :Completed", #end "ExpressionAttributeValues": { ":pk": { "S": "project" }, ":sk": { "S": "$context.authorizer.claims.email" }, #if ($input.params('projectStatus') == 'archived') ":Archived": { "S": "Archived" } #else ":InProgress": { "S": "In Progress" }, ":Completed": { "S": "Completed" } #end } } Another example with optional array; without condition will fail because of invalid resulting JSON: { "email": "$context.authorizer.claims.email" #if ($input.params('countries') != "") , "countries": $input.params('countries') #end } The syntax and overall concept of the Apache Velocity templates is similar to the syntax of the older WebMacro template engine, which is now also an open source project.[src]
13 sentences · 13 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Apache Velocity." encyclopegia.org, 2026, https://encyclopegia.org/wiki/apache-velocity. Accessed 25 November 2026.
Chicago
"Apache Velocity." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/apache-velocity.
APA
encyclopegia.org. (2026). Apache Velocity. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/apache-velocity
Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON
Claims
| Predicate | Value | Source |
|---|---|---|
| release date | 2001 | Wikipedia |