README of the version 1.7.5 of org.szegedi.expose packages ========================================================== NEW IN 1.7.5 ------------ * Expose package moved to freemarker.ext.* in the FreeMarker development tree. NEW IN 1.6.3 ------------ * Updated XML support to support keys starting with underscore (i.e. _children instead of x_children) * Added JSP taglib for evaluating FreeMarker templates from JSP. See /examples/jsp directory. NEW IN 1.6b ----------- * Updated XML support to reflect changes made in JDOM beta7 (Expose previously relied on JDOM beta6). NEW IN 1.6a ----------- * Refactored support for TemplateListModel from ReflectionArrayModel, ReflectionCollectionModel and ReflectionMapModel. These classes no longer support the TemplateListModel interface directly as they did previously. The reason for this is that in order to be thread-safe, these classes stored the current iterator position in a ThreadLocal. As it turned out, this leads to memory leaks when used in conjunction with thread pooling (which is present effectively in all server apps), as discussed here: http://discuss.develop.com/archives/wa.exe?A2=ind0106&L=ADVANCED-JAVA&P=R3360 In the new setup, ReflectionArrayModel and ReflectionCollectionModel now support the "iterator" key, which always yields a new TemplateListModel that is private to the thread-processing template. so you should modify your templates accordingly: --> --> ReflectionMapModel has introduced no new keys, however to achieve the same behavior as in previous version of Expose you should modify your templates this way: --> On a sidenote, the new implementation is also much faster as no ThreadLocal lookup is performed on each hasNext/next call. * As a minor improvement ReflectionIteratorModel and ReflectionEnumerationModel now bypass instance caching altogether -- since iterators and enumerations are short lived, one-shot objects caching them makes little sense. NEW IN 1.6 ---------- * Full JDOM support in org.szegedi.expose.jdom.NodeListModel. Supports variety of JDOM tree traversals (even recursive), using a set of nodes as a list, text and attribute value as scalars, and even a complete XPath support built on top of the third-party werken.xpath library. See examples/jdom. * Ant support built on top of JDOM support. Now you can use FreeMarker as an Ant task that takes a bunch of XML documents, processes them through a template and outputs the result in a directory. Great for generating documentation, SQL scripts, etc. See examples/ant for an example of how to convert a theoretical FreeMarker FAQ from XML to HTML using Ant and FreeMarker. BUILDING THE PACKAGES --------------------- Altough the classes are precompiled in the distribution, you can compile them by yourself. You will need the Ant tool from the Apache Jakarta project (http://jakarta.apache.org) to do the build. You will also need the original FreeMarker classes available on http://fm-classic.sourceforge.net. A build batch for Windows is provided. I guess it would be easy for a person with UNIX experience to produce an appropriate shell script from the batch. However, changing into Expose distribution directory and typing "ant" should do the trick. LICENSING --------- org.szegedi.expose.* packages are released under a license that is virtually equivalent with Apache 1.1 license. This means that as long as you leave the copyright and disclaimer in each source file intact, and you acknowledge the use of the packages in your product, you comply with it. Note however, that FreeMarker itself is LGPL-ed. CONTACT ------- Expose is maintained as part of the FreeMarker project at http://fm-classic.sourceforge.net. Expose can be discussed at fm-classic-devel@lists.sourceforge.net