TLD is a simple XML file that provides JSP TAG information in detail; create a new demotags.tld Save in / web-inf / tlds file, code:
Xml Version = "1.0" encoding = "ISO-8859-1"?>
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
1.0 TLIBVERSION>
1.1 jspition>
Demotags ShortName>
http://www.stardeveloper.com uri>
Demo Tags Library Info>
firsttage name>
com.stardeveloper.tag.test.firsttag tagclass>
Empty bodycontent>
Your First JSP Tag Info>
Name name>
false reguired>
attribute>
tag>
taglib> Tag Library Descriptor Note: All content is between and taglib>, XML Version = "1.0" eNCoding = "ISO-8859-1">
provides your Tag Library information, almost the same in all tags; 1.0 TLIBVERSION> notices the current Tag Library version; 1.1 jspition> specified JSP version; Demotags shortname> Indicates the name of Tag Library; http://www.stardeveloper.com uri>: There is not much place; and demo tags library info> is a simple description Now let's take a look at and tag>; firstttag name> com.stardeveloper.tag.test.FirstTAG tagclass> EMPTY bodycontent > Your First JSP Tag info> name name> false regue> attribute> tag> name is short before the prefix of JSP Name, such as firsttag In tagclass will contain complete JSP TAG CLASS path BodyContent should include the following: tagDependnt, JSP and EMPTYATTRIBUTE TAG Describes each property, in this example, Required is set to false, So this TAG can be used without having to enter any plants.