API / Apache Velocity Interview questions
What file extension do Velocity templates typically use?
Velocity templates conventionally use the .vm extension (short for "Velocity Macro/Markup"), such as welcome.vm or invoice-email.vm.
The extension itself isn't enforced by the engine — Velocity will happily parse and render any file regardless of its name, since the resource loader just reads it as text. Frameworks built on top of Velocity, like the old VelocityView servlet for web apps, are the ones that typically map requests to files ending in .vm by convention.
Some projects use more specific suffixes such as .vtl or embed Velocity snippets inside files with an entirely different extension (for example, generated .java or .sql files produced by code generators), which also works fine.
More Related questions...