Its also help full
We have a tag file packaged in a JAR file in the /WEB-INF/lib directory. The path to the tag file inside the JAR is /META-INF/tags/myTag.tag.
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_1.xsd" version="2.1">
<tlib-version>1.0</tlib-version>
<short-name>Hello</short-name>
<uri>
http://com.sap.testExample/HelloSimpleTagFile</uri>
<tag-file>
<name>myTag</name>
<path>/META-INF/tags/myTag.tag</path>
</tag-file>
</taglib>
You create a
JSP page, example.jsp, to use the tag and import the TLD. We can use one of the following ways:
● If you explicitly describe the tag files in a TLD, you use the uri attribute of the taglib directive to import the tags.
<%@ taglib prefix="my" uri="
http://com.sap.testExample/HelloSimpleTagFile " %>
● If you do not describe the tags in a TLD, you use the tagdir attribute of the taglib directive to import the tags.
<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
To invoke the tag and specify its attributes:
<my:myTag bgcolor="#FF0000" title="myTable"/>
Goutam
SCJP 1.4 (86%)