Before you start this, Its good to follow the following articles.
I will assume that your dropwizard project is running.
Add dependency of dropwizard-freemarker-views in your pom.xml
Your pom.xml should look like this:
Freemarker Template Language
Apache FreeMarker™ is a template engine. It’s a Java library to generate text output based on templates and data. Templates are written in the FreeMarker Template Language (FTL), which is a simple and specialized language. Template allows us to focus on how to present the data. Outside the template you are focusing on what data to present.
Further reading here.
Template Configuration Context
Hello World FTL
Add a directory at src level and add helloWorld.ftl
Hello World GET API
Add a get API to render HelloWorld FTL in browser
Run The Project
Open the API in the browser to see your helloWorld rendered.