自定义标签 基本概念: 一个类继承simpleTagSuppert类 复制tld文件 Scriptless , Jsp, entr 指定是否包含输出类型 <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0"> <description>JSTL 1.1 core library</description> <display-name>JSTL core</display-name> <tlib-version>1.1</tlib-version> <short-name>my</short-name> <uri>http://myuri</uri> <tag> <description></description> <name>myHello</name> <tag-class>demo.Hello</tag-class> <body-content>empty</body-content> </tag> <tag> <description></description> <name>myForEach</name> <tag-class>demo.ForEach</tag-class> //路径 <body-content>scriptless</body-content> //输出类型 <attribute> <name>属性</name> <required>是否时必须的</required> <rtexprvalue>是否支持表达式</rtexprvalue> </attribute> <attribute> <name>var</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> </taglib>