API / Apache Velocity Interview questions
List the comment syntax options available in VTL?
VTL supports two comment forms, both stripped from the rendered output.
| Syntax | Use case |
## comment | Single-line comment, rest of the line is ignored |
#* comment *# | Multi-line block comment, can span several lines |
There's also a documentation-style block comment, #** ... *#, used just above a Velocimacro definition to describe its parameters — some tooling can extract these into generated docs, similar to Javadoc. Comments are removed entirely during parsing, so they never appear in the final output and don't affect whitespace handling beyond the line they occupy.
More Related questions...