tld文件在eclipse里面怎么新建啊?

解决方案 »

  1.   

    File->New->file,input XXX.tld。
      

  2.   

    回楼上的兄弟:如果象你那样新建,下面的代码不会自动生成啊!我把一个好的tld文件拷到我建立的tld文件中还有错误:conn't 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>
    .......
    .......</taglib>
      

  3.   

    可是在xml文件里的描叙都显示错误了。就是下面有错误:  <taglib>
    <taglib-uri>/demotag</taglib-uri>
    <taglib-location>/WEB-INF/tlds/mytag.tld</taglib-location>
    </taglib>这个错误该不能不能管吧?应该跟那个tld文件有关系把?大虾,速回复啊!
      

  4.   

    还真行了,tld文件和xml文件里面都显示有错误,我的标签还能运行!总不能等文件里面别的错误来了,我也不知道吧!这是为什么啊?有错误还能运行!
      

  5.   

    右击项目选择new-other-xml-xml(BasicTemplates)-next-选择CreatXmlfile from a DTDFile输入文件名-next-选择selectXML Catalog entry-在出现的XML文本选择下拉框中选择-//sun.Microsystem,Inc.//DTD.jsp TagLibrary 1.2 //EN-选择next-完成