API / Apache Velocity Interview questions
What is Velocity Template Language (VTL)?
Velocity Template Language, or VTL, is the small scripting language used inside .vm template files. It defines exactly three kinds of constructs: references ($user.name), directives (#if, #foreach, #set, #macro), and comments (## or #* *#).
VTL is intentionally not a general-purpose programming language. It has no classes, no exception handling, and no way to declare new types — it can only read values that Java code already placed into the context and apply a limited set of control-flow directives to them.
That constraint is deliberate: it discourages putting business logic in the view layer and keeps templates readable by designers who aren't Java developers.
More Related questions...