Problem with Tomca 5.5 and web-app_2_4.xsd in Eclipse

Problem with Tomca 5.5 and web-app_2_4.xsd in Eclipse

am 14.10.2007 22:09:24 von John

Hi everybody,
I try to run the source codes from several books (written 2006 or
later) that use in their source code examples with some configuration
file like web.xml.
All web.xml files have this definition inside (so I assume that all
source codes from all the book I own are correct):

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"
version="2.4">


When try to validate this web.xml with XML Spy v4.0, I always get the
following error:

Validation error in another file: "http://java.sun.com/xml/ns/j2ee/web-
app_2_4.xsd"

.... which opens this xsd-file from the java.sun.com website. It's
interesting that when XML Spy tries to validate the "web-app_2_4.xsd"
another error is generated:

This schema doesn't appear to be valid... etc. etc.
"- undefined schema component 'base' encountered - simpleContent can
not have a base that is a complexType with complexContent".

.... and it points to this block:







So, I don't understand what is wrong with the validation of the
web.xml files. Is it a problem with the web.xml or with the .xsd-file
from the java.sun.com website? Or what else am I doing wrong?

I am using:

eclipse 3.3
apache-tomcat-5.5.25
jdk1.5.0_13
Windows XP Pro SP2

Thank you very much for your answers :-)
John