1

The following web.xml file

<!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>

    <display-name>My Web Application</display-name>


    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>


    <filter>
        <filter-name>dispatcher</filter-name>
        <filter-class>org.javalite.activeweb.RequestDispatcher</filter-class>
        <init-param>
            <param-name>exclusions</param-name>
            <param-value>css,images,js</param-value>
        </init-param>
        <init-param>
            <param-name>root_controller</param-name>
            <param-value>home</param-value>
        </init-param>
    </filter>


    <filter-mapping>
        <filter-name>dispatcher</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

</web-app>

causes Eclipse to swear that

The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".

i.e. no obligatory tags.

What is it dislike?

UPDATE

Error disappears if I remove filter and filter-mapping tags simultaneously. Unfortunately I need them and can't remove.

Dims
  • 47,675
  • 117
  • 331
  • 600

1 Answers1

1

The order of your elements must match the order they're listed in the error message. Try putting your filter and filter-mapping elements before your session-config element.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880