Basic Freemarker Configuration

Freemarker as Templating Technology have evolved a lot from it’s traditional peers like velocity and other scripting languages.

I just wanted to post few lines of code which i generally use in My FreemarkerUtility. Rename the download to .rar

Few of Common Problem we Face with Freemarker are in using map
One of the Error is like

Expected hash. evaluated instead to freemarker.ext.beans.SimpleMethodModel

This has been overcomed by following piece of code

// Specify how templates will see the data-model. This is an advanced
// topic...
// but just use this:
BeansWrapper bw = (BeansWrapper)cfg.getObjectWrapper();


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s