the "problem" is the first file doesn't match the dtd for web.xml. i
believe tomcat 3 silently ignored this, whereas tomcat 4 doesn't.
Marjou Xavier wrote:
>
> Hello
>
> For information :
>
> I got a problem with web.xml (attached File1 file) and Tomcat Milestone 4.0 b5:
> PARSE error at line 18 column -1
> org.xml.sax.SAXParseException: org.apache.crimson.parser/V-036 web-app servlet
>
> This same file was working with Tomcat V3.2 and 3.3
>
> Nevertheless, the equivalent web.xml of File2 is working fine
>
> Xavier Marjou
>
> File1:
> ======
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
> <web-app>
>
> <servlet>
> <servlet-name>foo</servlet-name>
> <servlet-class>FooServlet</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>foo</servlet-name>
> <url-pattern>/foo</url-pattern>
> </servlet-mapping>
>
> <servlet>
> <servlet-name>bar</servlet-name>
> <servlet-class>BarServlet</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>bar</servlet-name>
> <url-pattern>/bar</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
> File2:
> ======
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
> <web-app>
>
> <servlet>
> <servlet-name>foo</servlet-name>
> <servlet-class>FooServlet</servlet-class>
> </servlet>
>
> <servlet>
> <servlet-name>bar</servlet-name>
> <servlet-class>BarServlet</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>foo</servlet-name>
> <url-pattern>/foo</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>bar</servlet-name>
> <url-pattern>/bar</url-pattern>
> </servlet-mapping>
>
> </web-app>