VM File Documentation
Overview
| Feature | Value |
|---|---|
| File Extension | .vm |
| MIME Type | text/x-velocity |
| Primary Use | Template files for the Velocity Template Engine |
| Text-based | Yes |
| Supports Unicode | Yes |
| Language | Velocity Template Language (VTL) |
| File Signature | None specific; text-based |
| Templates for | Web pages, emails, configuration files |
| Creator | The Apache Software Foundation |
| Can Contain Java Code | Yes, inline Java code supported |
| Comments Syntax | ## for single line, #* and *# for block |
| Variable Declaration | $variableName for reference |
| Directive Syntax | #directiveName (e.g., #if, #foreach) |
| File Encoding | UTF-8 Recommended |
| Support for Macros | Yes |
| Merge/Interpolation | Inline variable and directive interpolation in strings |
| External Data Sources | Can integrate with external data like databases through Java code |
| Integration with Java | High, through the Velocity Engine API |
| Template Inheritance | Supported through the use of the #parse and #include directives |
| Loop Control Structures | Supported (#foreach) |
| Conditional Statements | Supported (#if, #elseif, #else) |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.