Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Freemarker specific settings

Taglib definitions (tld

...

)

FreeMarker won't does not search the classpath for finding the tlds but to find taglib definition. It uses only WEB-INF/lib and the entries defined in web.xml directly. There exist mainly the following are two workarounds:

A) register the tlds Register taglib definitions in web.xml

  1. Edit web.xml and add the taglib definitions as follows.

...

  1. It is important to

...

  1. add them before jsp-property-group.
    Code Block
    xml
    xml
    <jsp-config>
       <taglib>
         <taglib-uri>cms-taglib</taglib-uri>
         <taglib-location>cms-taglib.tld</taglib-location>
       </taglib>
       <taglib>
         <taglib-uri>cms-util-taglib</taglib-uri>
         <taglib-location>cms-util-taglib.tld</taglib-location>
       </taglib>
       <taglib>
          <taglib-uri>cmsfn-taglib</taglib-uri>
          <taglib-location>cmsfn-taglib.tld</taglib-location>
        </taglib>
    
        <jsp-property-group>
          <url-pattern>*.jsp</url-pattern>
          <page-encoding>UTF-8</page-encoding>
        </jsp-property-group>
    </jsp-config>
    

...

  1. Copy the files to webapp/WEB-INF.

B) put Put minimal jars JARs into WEB-INF/lib1. in

  1. In the webapp folder, execute:
    Code Block
    none
    none
      mvn war:inplace
    

...

  1. This generates a complete webapp in your src/webapp directory as opposed to target/webapp-name-1.0-SNAPSHOT. This is an Eclipse specific workaround.
  2. Delete all JARs except the taglib

...

  1. JARs in src/main/webapp/WEB-INF/lib

...

  1. Minimize the taglib

...

  1. JAR
    Code Block
    none
    none
     zip -d magnolia-taglib-cms-4.1.1-SNAPSHOT.jar /info/*
     zip -d magnolia-taglib-utility-4.1.1-SNAPSHOT.jar /info/*
    

Auto completion

Freemarker templates do not provide automatically auto completion of the provided objects.

...