[회전]tld 태그 설정 설명
4241 단어 tld
<?xmlversion="1.0"encoding="UTF-8"?>
<!DOCTYPEtaglibPUBLIC"-//SunMicrosystems,Inc.//DTDJSPTagLibrary1.1//EN""http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlib-version>1.0</tlib-version><!-- -->
<jsp-version>2.0</jsp-version><!--JSP -->
<short-name>examples</short-name><!--taglib prefix -->
<discription>Simpleexamplelibrary.</discription>
<tag>
<name>hello</name>
<tag-class>taglib.HelloTag</tag-class>
<tei-class>ProfileTagInfo</tei-class><!-- TagExtraInfo -->
<!--Thismeansthatthetagcannothavescriptingelements(〈%,〈%=,〈%!)inthebody.-->
<body-content>scriptless</body-content>
<discription>Firstexample</discription>
<variable>
<name-given>value</name-give>
<!--Thismeansthattheusageofthetaginajsppagemustcontainanattributenamed"var".-->
<name-from-attribute>var</name-from-attribute>
<variable-class>java.lang.Double</variable-class>
<scope>AT_BEGIN</scope><!--itcanbe:AT_BEGIN,AT_END,NESTED-->
</variable>
</tag>
<tag>
<name>put</name>
<tag-class>taglib.template.PutTag</tag-class><!-- ClassicTag-->
<!--3 :JSP ;tagdependent , ;empty -->
<body-content>JSP</body-content>
<discription>Secondexample.</discription>
<attribute>
<name>age</name>
<required>true</required><!-- true yes、false no -->
<rtexprvalue>true</rtexprvalue><!-- -->
<type>java.lang.Integer</type>
</attribute>
</tag>
<tag>
<name>price</name>
<tag-class>com.abc.PriceTag</tag-class>
<body-content>scriptless</body-content>
<variable>
<name-from-attribute>var</name-from-attribute>
<scope>NESTED</scope>
</variable>
<attribute>
<name>itemcode</name>
<required>true</required>
<rtexprvalue>false</rtexprvalue>
<attribute>
<tag>
<!-- JSP :
<item:priceitemcode="IT001"var='cost'/>
${cost}
</item:price>
-->
<tag>
<name>functions</name>
<tag-class>myTags.MathTag</tag-class><!-- SimpleTag-->
<body-content>empty</body-content><!--beacuseJSPfragmentnotsupportscriptlets,itcannotbe"JSP"!
Itcanbe:scriptless,tagdependent,empty.-->
<attribute>
<name>num</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<fragment>true</fragment>
</attribute>
<dynamic-attributes>true</dynamic-attributes>
<description>
SendsamathexpressiontotheJSP
</description>
</tag>
<tag-file><!-- -->
<name>tag2</name>
<path>/WEB-INF/tags/HelloWorld.tag</path>
</tag-file>
<function><!--EL -->
<discription>CountsthenumberofwordsinthegivenString.</discription>
<name>numWords</name>
<function-class>com.iee.TextEditor</function-class>
<function-signature>intnumWords(java.lang.String)</function-signature>
</function>
</taglib>
글 의 출처:
http://xiaoruanjian.iteye.com/blog/895301