Appendix B Installing FreeMarker
No real installation needed. Simply copy lib/freemarker.jar to a location where your Java application's class-loader will find it. For example, if you use FreeMarker in a web application, you probably want to put freemarker.jar into the WEB-INF/lib directory of your web application.
No real installation needed. Simply copy lib/freemarker.jar to a location where your Java application's ClassLoader will find it. For example, if you use FreeMarker in a web application, you probably want to put freemarker.jar into the WEB-INF/lib directory of your web application. (If you want to use FreeMarker with JSP Model-2 style (which also means that you can use custom JSP taglibs in the templates), some extra steps needed. For more information please see the chapter about servlets.)
However, some third party libraries have also be available for the class-loader, if you want to enable certain optional FreeMarker features:
-
At least J2SE 1.4 is required for regular expression built-ins.
-
At least J2SE 1.4 or a JAXP + DOM implementation + SAX implementation is needed for the XML wrapping.
-
Jaxen (recommended, download here) or Apache Xalan is needed for XML XPath support. Please use at least Jaxen 1.1-beta-8, not older versions! Apache Xalan classes are included in Sun J2SE 1.4, 1.5 and 1.6 (and maybe later too), so no separate Xalan jar is needed with those versions.
-
Obviously, javax.servlet classes are needed for FreemarkerServlet. Servlet version 2.2 or later is needed.
-
For the custom JSP taglib support, you will need JSP 1.2 API classes. No JSP implementation needed, just the API. For more information please see the chapter about servlets.
-
Obviously, Jython classes are needed for the Jython wrapper.
-
JDOM is needed for the deprecated freemarker.ext.jdom package.