Show TOC Start of Content Area

Procedure documentation Describing the Tag Library  Locate the document in its SAP Library structure

You describe your tag library in a Tag Library Descriptor. Here you define common information about the tag library itself (such as the version, the short name to be referenced with, the location of the library, and so on), and describe each component of the library. Different tags are described within the <tag> group of XML tags.

In the case of our HelloWorld tag, the tag library consists of only one tag, and the Tag Library Descriptor, which looks like:

Example

<taglib>

  <tlibversion> 1.0 </tlibversion>

  <jspversion> 1.2 </jspversion>

  <shortname> hello </shortname>

  <info>

    Some info here.

  </info>

 

   <tag>

      <name> HelloWorld </name>

      <tagclass> HelloWorldTag </tagclass>

      <bodycontent> empty </bodycontent>

      <info> A Hello World tag </info>

   </tag>

</taglib>

Note

The value of the <tagclass> tag must be the fully qualified class name of the tag handler class.

Note

The <shortname> tag contains the name with which you refer to the tag library in the JSP.

For more information about the document type definition of the Tag Library Descriptor, refer to the Java Server Pages™ 1.2 Specification.

 

End of Content Area