Added support for using freemarker templates for resource requests