The content of element type "..." must match in web.xml
One very simple solution which solves my problem.
Change the schema reference from
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app></web-app>
to this
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
version="2.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
// ...
// your all content goes here
</web-app>
I had the same problem in Eclipse, after re-order tags as DTD, the error goes way. You may also try to restart Eclipse.