回 帖 发 新 帖 刷新版面

主题:标签库问题(高手请进)

请问哪位大哥会写.tld文件(标签库描述文件)啊!能否教教小弟,最好有一个Demo并加以说明!亿分感谢!
我现在抄了一个Demo但是验证不过去,提示“cvc-elt.1: Cannot find the declaration of element 'taglib'.”
麻烦哪位大哥帮我看看
<?xml version="1.0" encoding="ISO-8859-1"?>
<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 web-jsptaglibrary_2_0.xsd"
  version="2.0">
  <description>A tag library exercising SimpleTag handlers</description>
  <tlib-version>1.0</tlib-version>
  
  <short-name>example</short-name>
  <uri>/demotag</uri>
  <description>Study Tag</description>
  
  <tag>
    <description>Outputs Hello</description>
    <name>hello_int</name>
    <tag-class>cn.com.taglib.HelloTag_Interface</tag-class>
    <body-content>empty</body-content>
  </tag>
</taglib>

回复列表 (共1个回复)

沙发

<?xml version="1.0" encoding="ISO-8859-1" ?>

<taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>2.0</jspversion>
    <shortname>bbstlds</shortname>
    <info>this is the tld file of Next! bbs</info>
    <tag>
        <name>listTopic</name>
        <tagclass>com.haifi.ListTopicTag</tagclass>
        <teiclass>com.haifi.ListTopicTagExtra</teiclass>
        <bodycontent>JSP</bodycontent>
        <info>List Topic</info>
        <attribute>
            <name>bankuai_id</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
        <attribute>
            <name>listTopicIndex</name>
            <required>true</required>
            <rtexprvalue>true</rtexprvalue>
        </attribute>
    </tag>
</taglib>

我来回复

您尚未登录,请登录后再回复。点此登录或注册