datetag tld文件: <& 63;xml version="1 0" encoding="ISO-8859-1" & 63;> <!DOCTYPE taglib PUBLIC "- Sun Microsystems, Inc DTD JSP Tag Library 1 2 EN" "http: java sun com dtd web-jsptaglibrary_1_2 dtd"> <taglib> <tlib-version>1 0< tlib-version> <jsp-version>1 2< jsp-version> <short-name>date< short-name> <uri>http: com demo util datejstl tags< uri> <tag> <name>date< name> <tag-c

datetag.tld文件:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>date</short-name>
<uri>http://com.demo.util.datejstl/tags</uri>
<tag>
<name>date</name>
<tag-class>com.demo.util.jstl.JSTLUtil</tag-class>
<attribute>
<name>value</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>parttern</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</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>

关键字标签:

上一篇:window.top[_CACHE]实现多个jsp页面共享一个js对象
下一篇:JSP中的编译指令和动作指令的两点区别