API / Apache FreeMarker Interview questions
What is Apache FreeMarker?
Apache FreeMarker is a Java-based template engine, maintained by the Apache Software Foundation, used to generate text output by combining a template with a data model. It has no dependency on servlets, HTTP, or HTML, so it can produce web pages, e-mails, configuration files, source code, or any other text-based output.
A FreeMarker template is written in FreeMarker Template Language (FTL) and mixes static text with directives such as <#if> and <#list>, plus interpolations like ${user.name}. Java code builds the data model and hands it, together with the template, to FreeMarker's processing engine, which writes the merged result to a stream.
This split keeps templates free of business logic and keeps Java code free of formatting concerns, which is the core idea behind the MVC-style separation FreeMarker was built for.
More Related questions...