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

J

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):

<web-app 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"
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:

<xsd:complexType name="filter-nameType">
<xsd:simpleContent>
<xsd:extension base="j2ee:nonEmptyStringType"/>
</xsd:simpleContent>
</xsd:complexType


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,882
Messages
2,569,948
Members
46,267
Latest member
TECHSCORE

Latest Threads

Top