The HTML Template Language (HTL) separates logic from markup. Compared to JSP, it has a stronger security model and keeps projects efficient, and it has powerful extension mechanisms for reusing both logic and markup.
HTL is made of two parts:
- Expression language — inserts pieces of content into the rendered markup.
- Block statements — define statements over blocks of markup, such as conditions and iterations.
HTL is strict: it does not let you mix code into the markup. Instead it uses the Use-API to run code from the template.
The common and recommended approach is to write business logic in Java. When a component needs view-specific changes beyond what the Java API provides, use server-side JavaScript.

Advantages
Increased security
HTL is compiled into Java servlets. Expressions and HTL data attributes are evaluated entirely on the server, so viewing the source of the rendered page shows none of them.
Reduced costs
Better security, simpler development and easier collaboration between front-end and back-end developers mean a faster time to market and a lower total cost of ownership.
Simplified development
HTL is easy to learn for anyone who knows HTML. Its syntax and features are deliberately limited so that it stays simple and straightforward.