标签库文件(存放在WEB/INF目录下):
Xml代码 复制代码 1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
3. "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
4. <taglib>
5. <!-- ============== Tag Library Description Elements ============= -->
6. <tlib-version>1.2</tlib-version>
7. <jsp-version>1.2</jsp-version>
8. <short-name>tags</short-name>
9. <uri>/WEB-INF/tags.tld</uri>
10. <display-name>bookstore</display-name>
11. <description>
12. This tag library contains tags used by the bookstore
13. application.
14. </description>
15.
16. <!-- ===================== tags for image map component ============================ -->
17. <tag>
18. <name>tableGrid</name>
19. <tag-class>
20. com.dongyun.platform.component.jsf.tablegrid.PFHtmlTableGridTag
21. </tag-class>
22. <description>
23. Description of a single hotspot in a client side image map.
24. This tag MUST be nested inside a <map> tag. To specify
25. the hotspot characteristics, you must specify EITHER a value
26. OR the alt, coords, and shape attributes.
27. </description>
28. </tag>
29. </taglib> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<!-- ============== Tag Library Description Elements ============= -->
<tlib-version>1.2</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>tags</short-name>
<uri>/WEB-INF/tags.tld</uri>
<display-name>bookstore</display-name>
<description>
This tag library contains tags used by the bookstore
application.
</description> <!-- ===================== tags for image map component ============================ -->
<tag>
<name>tableGrid</name>
<tag-class>
com.dongyun.platform.component.jsf.tablegrid.PFHtmlTableGridTag
</tag-class>
<description>
Description of a single hotspot in a client side image map.
This tag MUST be nested inside a <map> tag. To specify
the hotspot characteristics, you must specify EITHER a value
OR the alt, coords, and shape attributes.
</description>
</tag>
</taglib> 引用该自定义标签的页面:
Xml代码 复制代码 1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3. <html xmlns="http://www.w3.org/1999/xhtml"
4. xmlns:rich="http://richfaces.org/rich"
5. xmlns:ui="http://java.sun.com/jsf/facelets"
6. xmlns:h="http://java.sun.com/jsf/html"
7. xmlns:f="http://java.sun.com/jsf/core"
8. xmlns:a4j="http://richfaces.org/a4j"
9. xmlns:cd="/WEB-INF/tags.tld"
10. xml:lang="en" lang="en">
11. <head>
12. <title>日志管理界面</title>
13. <meta http-equiv="keywords" content="enter,your,keywords,here" />
14. <meta http-equiv="description"
15. content="A short description of this page." />
16. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
17. </head>
18. <body>
19. <cd:tableGrid />
20. </body>
21. </html> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:cd="/WEB-INF/tags.tld"
xml:lang="en" lang="en">
<head>
<title>日志管理界面</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<cd:tableGrid />
</body>
</html> tomcat正常启动没有问题。但是当用firefox打开这个Log.jsf页面时,什么东西都没显示出来。查看其原代码如下:
Xml代码 复制代码 1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
3. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cd="/WEB-INF/tags.tld" xml:lang="en" lang="en">
4. <head>
5. <title>日志管理界面</title>
6. <meta http-equiv="keywords" content="enter,your,keywords,here" />
7. <meta http-equiv="description" content="A short description of this page." />
8. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
9. </head>
10. <body>
11.
12. <cd:tableGrid></cd:tableGrid>
13. </body>
14. </html> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:cd="/WEB-INF/tags.tld" xml:lang="en" lang="en">
<head>
<title>日志管理界面</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description" content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body> <cd:tableGrid></cd:tableGrid>
</body>
</html> 是不是xhtml什么地方没配对,为什么
Xml代码 复制代码 1. <cd:tableGrid></cd:tableGrid> <cd:tableGrid></cd:tableGrid>还显示在页面上呢?大家帮我看看。谢谢了!
Xml代码 复制代码 1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
3. "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
4. <taglib>
5. <!-- ============== Tag Library Description Elements ============= -->
6. <tlib-version>1.2</tlib-version>
7. <jsp-version>1.2</jsp-version>
8. <short-name>tags</short-name>
9. <uri>/WEB-INF/tags.tld</uri>
10. <display-name>bookstore</display-name>
11. <description>
12. This tag library contains tags used by the bookstore
13. application.
14. </description>
15.
16. <!-- ===================== tags for image map component ============================ -->
17. <tag>
18. <name>tableGrid</name>
19. <tag-class>
20. com.dongyun.platform.component.jsf.tablegrid.PFHtmlTableGridTag
21. </tag-class>
22. <description>
23. Description of a single hotspot in a client side image map.
24. This tag MUST be nested inside a <map> tag. To specify
25. the hotspot characteristics, you must specify EITHER a value
26. OR the alt, coords, and shape attributes.
27. </description>
28. </tag>
29. </taglib> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<!-- ============== Tag Library Description Elements ============= -->
<tlib-version>1.2</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>tags</short-name>
<uri>/WEB-INF/tags.tld</uri>
<display-name>bookstore</display-name>
<description>
This tag library contains tags used by the bookstore
application.
</description> <!-- ===================== tags for image map component ============================ -->
<tag>
<name>tableGrid</name>
<tag-class>
com.dongyun.platform.component.jsf.tablegrid.PFHtmlTableGridTag
</tag-class>
<description>
Description of a single hotspot in a client side image map.
This tag MUST be nested inside a <map> tag. To specify
the hotspot characteristics, you must specify EITHER a value
OR the alt, coords, and shape attributes.
</description>
</tag>
</taglib> 引用该自定义标签的页面:
Xml代码 复制代码 1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3. <html xmlns="http://www.w3.org/1999/xhtml"
4. xmlns:rich="http://richfaces.org/rich"
5. xmlns:ui="http://java.sun.com/jsf/facelets"
6. xmlns:h="http://java.sun.com/jsf/html"
7. xmlns:f="http://java.sun.com/jsf/core"
8. xmlns:a4j="http://richfaces.org/a4j"
9. xmlns:cd="/WEB-INF/tags.tld"
10. xml:lang="en" lang="en">
11. <head>
12. <title>日志管理界面</title>
13. <meta http-equiv="keywords" content="enter,your,keywords,here" />
14. <meta http-equiv="description"
15. content="A short description of this page." />
16. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
17. </head>
18. <body>
19. <cd:tableGrid />
20. </body>
21. </html> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:rich="http://richfaces.org/rich"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:cd="/WEB-INF/tags.tld"
xml:lang="en" lang="en">
<head>
<title>日志管理界面</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<cd:tableGrid />
</body>
</html> tomcat正常启动没有问题。但是当用firefox打开这个Log.jsf页面时,什么东西都没显示出来。查看其原代码如下:
Xml代码 复制代码 1. <?xml version="1.0" encoding="UTF-8"?>
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
3. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cd="/WEB-INF/tags.tld" xml:lang="en" lang="en">
4. <head>
5. <title>日志管理界面</title>
6. <meta http-equiv="keywords" content="enter,your,keywords,here" />
7. <meta http-equiv="description" content="A short description of this page." />
8. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
9. </head>
10. <body>
11.
12. <cd:tableGrid></cd:tableGrid>
13. </body>
14. </html> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:cd="/WEB-INF/tags.tld" xml:lang="en" lang="en">
<head>
<title>日志管理界面</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description" content="A short description of this page." />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
</head>
<body> <cd:tableGrid></cd:tableGrid>
</body>
</html> 是不是xhtml什么地方没配对,为什么
Xml代码 复制代码 1. <cd:tableGrid></cd:tableGrid> <cd:tableGrid></cd:tableGrid>还显示在页面上呢?大家帮我看看。谢谢了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货