Where to place a facelet tag library descriptor 

Joined:
08/13/2009
Posts:
164

November 03, 2011 21:11:55    Last update: November 03, 2011 21:11:55
Facelet tag library descriptors can be specified in one of two ways:
  1. In web.xml, as <context-param>:
    <context-param>
        <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
        <param-value>/taglibs/tags1.xml;/taglibs/tags2.xml</param-value>
    </context-param>
    

    where javax.faces.FACELETS_LIBRARIES is interpreted as a semicolon (;) separated list of paths, starting with "/" (without quotes). Each entry in the list is a path relative to the web application root, and is interpreted as a facelet XML tag library descriptor.

    The parameter facelets.LIBRARIES is an alias to javax.faces.FACELETS_LIBRARIES for backwards compatibility reasons.

  2. Via auto-discovery, by placing the XML tag library descriptor within a jar on the web application classpath (for example, under the folder WEB-INF/lib). The file should have a name suffix .taglib.xml, and be placed in the META-INF folder of the JAR file.
Share |
| Comment  | Tags