jsp2-example-taglib.tld
上传用户:bj_pst
上传日期:2019-07-07
资源大小:7353k
文件大小:5k
源码类别:

Java编程

开发平台:

Java

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3.  Licensed to the Apache Software Foundation (ASF) under one or more
  4.   contributor license agreements.  See the NOTICE file distributed with
  5.   this work for additional information regarding copyright ownership.
  6.   The ASF licenses this file to You under the Apache License, Version 2.0
  7.   (the "License"); you may not use this file except in compliance with
  8.   the License.  You may obtain a copy of the License at
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.   Unless required by applicable law or agreed to in writing, software
  11.   distributed under the License is distributed on an "AS IS" BASIS,
  12.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.   See the License for the specific language governing permissions and
  14.   limitations under the License.
  15. -->
  16. <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
  17.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  18.     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
  19.     version="2.0">
  20.     <description>A tag library exercising SimpleTag handlers.</description>
  21.     <tlib-version>1.0</tlib-version>
  22.     <short-name>SimpleTagLibrary</short-name>
  23.     <uri>/SimpleTagLibrary</uri>
  24.     <tag>
  25. <description>Outputs Hello, World</description>
  26.         <name>helloWorld</name>
  27. <tag-class>jsp2.examples.simpletag.HelloWorldSimpleTag</tag-class>
  28. <body-content>empty</body-content>
  29.     </tag>
  30.     <tag>
  31.         <description>Repeats the body of the tag 'num' times</description>
  32.         <name>repeat</name>
  33.         <tag-class>jsp2.examples.simpletag.RepeatSimpleTag</tag-class>
  34.         <body-content>scriptless</body-content>
  35.         <variable>
  36.             <description>Current invocation count (1 to num)</description>
  37.             <name-given>count</name-given>
  38.         </variable>
  39.         <attribute>
  40.             <name>num</name>
  41.             <required>true</required>
  42.             <rtexprvalue>true</rtexprvalue>
  43.         </attribute>
  44.     </tag>
  45.     <tag>
  46. <description>Populates the page context with a BookBean</description>
  47.         <name>findBook</name>
  48. <tag-class>jsp2.examples.simpletag.FindBookSimpleTag</tag-class>
  49. <body-content>empty</body-content>
  50. <attribute>
  51.     <name>var</name>
  52.     <required>true</required>
  53.     <rtexprvalue>true</rtexprvalue>
  54. </attribute>
  55.     </tag>
  56.     <tag>
  57.         <description>
  58.             Takes 3 fragments and invokes them in a random order
  59.         </description>
  60.         <name>shuffle</name>
  61.         <tag-class>jsp2.examples.simpletag.ShuffleSimpleTag</tag-class>
  62.         <body-content>empty</body-content>
  63.         <attribute>
  64.             <name>fragment1</name>
  65.             <required>true</required>
  66.     <fragment>true</fragment>
  67.         </attribute>
  68.         <attribute>
  69.             <name>fragment2</name>
  70.             <required>true</required>
  71.     <fragment>true</fragment>
  72.         </attribute>
  73.         <attribute>
  74.             <name>fragment3</name>
  75.             <required>true</required>
  76.     <fragment>true</fragment>
  77.         </attribute>
  78.     </tag>
  79.     <tag>
  80.         <description>Outputs a colored tile</description>
  81.         <name>tile</name>
  82.         <tag-class>jsp2.examples.simpletag.TileSimpleTag</tag-class>
  83.         <body-content>empty</body-content>
  84.         <attribute>
  85.             <name>color</name>
  86.             <required>true</required>
  87.         </attribute>
  88.         <attribute>
  89.             <name>label</name>
  90.             <required>true</required>
  91.         </attribute>
  92.     </tag>
  93.     <tag>
  94. <description>
  95.   Tag that echoes all its attributes and body content
  96. </description>
  97. <name>echoAttributes</name>
  98. <tag-class>jsp2.examples.simpletag.EchoAttributesTag</tag-class>
  99. <body-content>empty</body-content>
  100. <dynamic-attributes>true</dynamic-attributes>
  101.     </tag>
  102.     <function>
  103.         <description>Reverses the characters in the given String</description>
  104.         <name>reverse</name>
  105. <function-class>jsp2.examples.el.Functions</function-class>
  106. <function-signature>java.lang.String reverse( java.lang.String )</function-signature>
  107.     </function>
  108.     <function>
  109.         <description>Counts the number of vowels (a,e,i,o,u) in the given String</description>
  110.         <name>countVowels</name>
  111. <function-class>jsp2.examples.el.Functions</function-class>
  112. <function-signature>java.lang.String numVowels( java.lang.String )</function-signature>
  113.     </function>
  114.     <function>
  115. <description>Converts the string to all caps</description>
  116.         <name>caps</name>
  117. <function-class>jsp2.examples.el.Functions</function-class>
  118. <function-signature>java.lang.String caps( java.lang.String )</function-signature>
  119.     </function>
  120. </taglib>