I have this web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>jsp-tags</display-name>
<taglib>
<taglib-uri>mytags</taglib-uri>
<taglib-location>/WEB-INF/mytaglib.tld</taglib-location>
</taglib>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
The is highlighted and the error the IDE gives is: "Invalid content was found starting with element ...
What more do I need to do?
In the XSD referenced in your XML, it states that for complex type web-appType you can only have a choice of zero to many of the following elements:
The taglib element is not referenced in the XSD at all.
From reading this link it would seem that you do not need to declare taglibs in the web-app document. Simply having the version="2.5" attribute means you can reference tags in your JSPs.
Use this notation:
But I recommended to read this link. This tutorial will give you idea how to avoid declaring taglibs in web.xml in case of JSP 2.0
If the taglib is inside of a maven dependency, just set the scope to compile.