facebook

web.xml parsing problem with Eclipse 3.1M6 a MyEclipse 3.8.4

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #229062 Reply

    When parsing my web.xml file (partially listed below)

    <web-app version=”2.4″
    xmlns=”http://java.sun.com/xml/ns/j2ee&#8221;
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221;
    xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;
    <filter>
    <filter-name>SessionFilter</filter-name>
    <description>Filter to handle Hibernate Session</description>
    <filter-class>com.cpex.mpv.persistence.SessionFilter</filter-class>
    </filter>

    I get the following error:
    cvc-complex-type.2.4.a: Invalid content was found starting with element ‘description’. One of ‘{“http://java.sun.com/xml/ns/j2ee&#8221;:filter-class}’ is expected. web.xml MPV 2.01 (ROOT)/WebRoot/WEB-INF line 9

    The only way to get it to parse correctly is to remove the <description/> tag altogether. Is there a way to get ME 3.8.4 to recognize the <xsd:group ref=”j2ee:descriptionGroup”/> portion of the filterType declaration?

    Thanks,
    Chase

    #229069

    Riyad Kalla
    Member

    Chase,
    The order of your tags matter and IIRC the <description> tag needs to come first, before your filter name or filter class entries.

    #229078

    Thanks. When I looked at the schema, I didn’t realize it was using a sequence.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: web.xml parsing problem with Eclipse 3.1M6 a MyEclipse 3.8.4

You must be logged in to post in the forum log in