Using FreeMarker with Apache Sling

I am using a content repository (Adobe CQ5) which has Apache Sling at the bottom. I would like to make web pages using FreeMarker instead of JSP.

To do this, do I need to download the OSGi Freemarker extension in Sling, which should be found in the contribution part of the Sling source code, or should I download the OSGi Freemarker version instead? Both jars implement javax.script.ScriptEngineFactory interface, so I don’t know which one to use, or load both.

+3
source share
2 answers

I managed to get Freemarker to work on CQ5.3 by doing the following:

  • Get source from svn checkout http://svn.apache.org/repos/asf/sling/trunk sling
  • contrib/scripting/freemarker slf4j FreemarkerScriptEngine.java - 500 - NoClassDefFoundException. , CQ5 slf4j, Freemarker ( , , )
  • , Sling "script" .ftl.

, CQ5, freemarker.jar, , .

, script , , slf4j .

+5

OSGi Freemarker; Freemarker Sling. , OSGi Freemarker, : -)

: - Script -. Freemarker, .

+2

All Articles