facebook

Cannot find the declaration of element ‘taglib’ [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #231099 Reply

    wjmorris
    Member

    Can anyone held me i am tring to create a Tag Library Descriptor for a custom tag and I am getting the error that it cannot find the declaration of the element ‘taglib’ but I have it in the file. Do I have MyEclipse 3.8.4 configured wrong? Enclosed is the Tag Library Descriptor file.

    I can’t figure out why keep getting the error that states

    cvc-elt.1: Cannot find the declaration of element ‘taglib’

    Thanks for your help

    
    <?xml version="1.0" encoding="UTF-8" ?>
    
        
    <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"> 
      
        <tlib-version>1.0</tlib-version>
        <short-name>simplefaq</short-name>
        
        <tag>
            <name>simplelist</name>
            <tag-class>Ch04.SimpleList</tag-class>
            <body-content>scriptless</body-content>
            <attribute>
                <name>topic</name>
                <required>yes</required>
                <rtexprvalue>true</rtexprvalue>
            </attribute>
        </tag>
    </taglib>
    
    #231106 Reply

    Riyad Kalla
    Member

    Try using this <taglib> Element instead:

    
    <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 http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
        version="2.0">
    

    You are missing the namespace right before the location and I wonder if that is why it’s complaining.

    #231110 Reply

    wjmorris
    Member

    Thanks That worked.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Cannot find the declaration of element ‘taglib’ [Closed]

You must be logged in to post in the forum log in