1.创建一个目录:例如tag-libraries
2.在tag-libraries下创建另外一个目录:META-INF(必须的)
3.将你编写的“.tld”文件放入“META-INF”目录中,返回tag-libraries
4.将你的class文件带包放入此目录中:例如com.demo.……
5.将资源文件放在META-INF下的resource文件夹下
第二步:打包成jar
1.运行cmd,输入命令:jar cvf my-taglib.jar META-INF com
也可以直接利用maven打包
<resources>
<resource>
<directory>src/main/webapp/resources</directory>
<targetPath>META-INF/resources/resources</targetPath>
<includes>
<include>**/*.css</include>
<include>**/*.less</include>
<include>**/*.js</include>
<include>**/*.png</include>
<include>**/*.gif</include>
<include>**/*.jpg</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/webapp/WEB-INF</directory>
<targetPath>META-INF</targetPath>
<includes>
<!-- <include>**/*.xml</include>-->
<include>**/*.tld</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>