I'm running Apache Tomcat/4.1.30 on Windows XP and I have the following problem:
This web.xml works fine:
<web-app>
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
This one also works fine:
<web-app>
<description>MySQL Test App</description>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
But this one generates an error when I start Tomcat:
<web-app>
<description>MySQL Test App</description>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
Here is the error:
1-Aug-2004 8:02:28 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 23 column 11: The content of element type "web-app"
must match "(icon?,display-name?,description?,distributable?,context-param*,filt
er*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-map
ping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,sec
urity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref
*)".
Any suggestion as to what is causing the problem?
This web.xml works fine:
<web-app>
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
This one also works fine:
<web-app>
<description>MySQL Test App</description>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
But this one generates an error when I start Tomcat:
<web-app>
<description>MySQL Test App</description>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
</web-app>
Here is the error:
1-Aug-2004 8:02:28 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 23 column 11: The content of element type "web-app"
must match "(icon?,display-name?,description?,distributable?,context-param*,filt
er*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-map
ping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,sec
urity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref
*)".
Any suggestion as to what is causing the problem?