FreeMarker Hello World

FreeMarker Hello World

It’s one more template engine in the line to generate text output. It’s java class library to use in java programming. People generally use this template to generate HTML page and its good fit in any MVC application if you want to avoid JSP and keep your client page neat and clean. Basic idea behind this template is to keep HTML designer separate from java programmer where both can work independently. Java programmer writes application logic and designer works on html page design and finally all static data could be replace using FreeMarker engine. Below is high level diagram:

FreeMarker Hello World

To understand how this template works please follow below steps to Print hello world.

  • Maven project structure:

FreeMarker Hello World

Important: You will have to include freemarker.x.x.x.jar.

  • pom.xml:

  • FreeMarkerHelloWorld.ftl


  • Once you setup your project right click –> Run As –> Java Application you will see below out on console and file:

FreeMarker Hello World

  • For more information please visit here

download  Download Project:  FreeMarkerHelloWorld

Leave a Reply

Your email address will not be published. Required fields are marked *