标签:
datetag.tld文件:
1 <?xml version="1.0" encoding="ISO-8859-1" ?> 2 <!DOCTYPE taglib 3 PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" 4 "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> 5 <taglib> 6 <tlib-version>1.0</tlib-version> 7 <jsp-version>1.2</jsp-version> 8 <short-name>date</short-name> 9 <uri>http://com.demo.util.datejstl/tags</uri> 10 <tag> 11 <name>date</name> 12 <tag-class>com.demo.util.jstl.JSTLUtil</tag-class> 13 <attribute> 14 <name>value</name> 15 <required>true</required> 16 <rtexprvalue>true</rtexprvalue> 17 </attribute> 18 <attribute> 19 <name>parttern</name> 20 <required>true</required> 21 <rtexprvalue>true</rtexprvalue> 22 </attribute> 23 </tag> 24 </taglib>
在Jsp页面中引用:
<%@ taglib uri="http://com.demo.util.datejstl/tags" prefix="date"%>
在Jsp页面中用法:
<date:date value="${time}" parttern="yyyy-MM-dd HH:mm:ss"></date:date></div>
标签:
原文地址:http://www.cnblogs.com/koal/p/4390245.html