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

Discussion in 'Java' started by John, Oct 14, 2007.

  1. John

    John Guest

    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
    John, Oct 14, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,069
    Markus
    Nov 22, 2005
  2. Rick Razzano

    XSD document for XSD defintion

    Rick Razzano, Sep 26, 2003, in forum: XML
    Replies:
    1
    Views:
    456
    C. M. Sperberg-McQueen
    Sep 26, 2003
  3. Replies:
    1
    Views:
    837
    Martin Honnen
    Jan 14, 2004
  4. Peter Aberline

    xsd:any as a child of xsd:all

    Peter Aberline, Apr 5, 2004, in forum: XML
    Replies:
    0
    Views:
    763
    Peter Aberline
    Apr 5, 2004
  5. Bernd Oninger
    Replies:
    1
    Views:
    510
    Henry S. Thompson
    Jun 30, 2004
Loading...

Share This Page