Creating a tag library definition file

A tag library definition file is used to deploy custom JSP tag libraries. The WebSphere Commerce analytics tags are implemented as custom JSP tags, so you need to create a taglib definition file (TLD) for the analytics system. All the tags that you create for the analytics system need to be defined in the TLD file.


  1. In the Enterprise Explorer view, navigate to Stores > WebContent > WEB-INF
  2. Right-click the WEB-INF folder; then click New > File.
  3. In the File Name field, type a name for the file.
    For example, mytaglib.tld.
  4. Click Finish .
  5. Enter your tag library definition.
    The following is a sample snippet of the tag library definition for the page view tag class example from the previous task:
    <?xml version="1.0" encoding="ISO-8859-1" ?>        
        <display-name>Tag library for Analytics enablement</display-name>
        <description>A convenience tag library for Analytics enablement on WebSphere Commerce</description>
            <description>Includes the required vendor specific JavaScript
                <description>Name of the page being viewed. If missing, the page title will be used.</description>

    For your page view tag: if you want to use the auto tagging utility to tag all your store pages with page view tags, make sure to use the tag name pageview, as in the previous snippet.

  6. Save the file.