I come across an error that I am not able to solve, the fact is that after making some example codes and testing them with the Tomcat 10 server that I have installed, they work fine but in the dynamic web project, specifically the web.xml file gives me error, I attach a photo and code in case someone knows how to solve it, although I have tried to change j2ee for javaee and the label continues to give me an error.
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
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-app_2_4.xsd">
<display-name>otro</display-name>
<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>
I have tried to put 2.4 and the error disappears on line 2 version="2.5" but the file continues with the error and also the error continues, thank you very much in advance.
All the best
Good morning, I managed to solve the problem just by replacing j2ee with javaee on line 3, thus eliminating the underlined error on line 2 -> 2.5 and the one on line 6 -> .
Later I have saved the changes and the errors have been removed except in line 2 that followed the typical red circle with a white cross with which you cannot solve anything, but this time I have pressed the right button on the project and then Build Project , which has completely fixed the bugs in my project.
I have also replaced in line 5 -> web-app_2_4.xsd with web-app_2_5.xsd, since if you copy this address: https://java.sun.com/xml/ns/javaee/web-app_2_4.xsd and you paste it in the browser it does not return any download of the xsd file and it redirects you to the oracle home page: https://www.oracle.com/java/technologies/ , however when you paste the address: https:// java.sun.com/xml/ns/javaee/web-app_2_5.xsd does return the download of the xsd file, just for this reason I leave it like this, but I already said that when I changed j2ee for javee it stopped giving syntax error .
I hope it will help someone who has the same thing happen to them, greetings to all and encouragement that everything has a solution.