taglib configuration in web.xml

11,167

web.xml is validated against an XML schema. This schema specifies that taglib can occur only when enclosed by a jsp-config tag.

Hence surround your taglib tag by a jsp-config tag

Please Refer: http://docs.oracle.com/cd/E11035_01/wls100/webapp/web_xml.html#wp1071166

for further details.

Also taglib is no longer required to be declared in web.xml , please read http://wiki.metawerx.net/wiki/RemovingTaglibFromWeb.xml

Share:
11,167
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years
      <taglib>
      <taglib-uri>  http://www.java2s.com/custom  </taglib-uri>
      <taglib-location>   /WEB-INF/tags/NewFile.tld  </taglib-location>
      </taglib>
    

    it is showing the error

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'. One of '{"http://java.sun.com/ xml/ns/javaee":module-name, "http://java.sun.com/xml/ns/javaee":description,

    any body please sugest me a way to solve this