You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Craig McDaniel <cr...@nplus1.net> on 2001/12/28 20:29:18 UTC
SAXParseException: The content of element type "web-app"...
When I start up tomcat, I get the following error in my logs:
org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)
Here is my web.xml:
<?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>
<display-name>Networld News Alerts</display-name>
<description>
This web application allows administration of HTML/text
email alerts.
</description>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>test</param-name>
<param-value>value</param-value>
</context-param>
</web-app>
The problem seems to be the context-param element. When I take it out,
things start up fine. I know context-param is valid, and it is even
mentioned in the error, so what gives?
Later,
--
\ Craig Patrick McDaniel
/_\ Software Engineer
/_/_\ n + 1, Inc.
/_/_/_\ craigm@nplus1.net
/_/_/_/_\ (502) 479-5557
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
RE: SAXParseException: The content of element type "web-app"...
Posted by ca...@kego.com.
The order of sections in web.xml is important.
Try using the order of sections as specified
from the error message. From the error message, the context-param
would come before the welcome-file-list.
-Cameron Elliott
> -----Original Message-----
> From: Craig McDaniel [mailto:craigm@nplus1.net]
> Sent: Friday, December 28, 2001 11:29 AM
> To: tomcat-user@jakarta.apache.org
> Subject: SAXParseException: The content of element type "web-app"...
>
>
> When I start up tomcat, I get the following error in my logs:
>
> org.xml.sax.SAXParseException: The content of element type
> "web-app" must match
> "(icon?,display-name?,description?,distributable?,context-param*,s
> ervlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-fil
> e-list?,error-page*,taglib*,resource-ref*,security-constraint*,log
> in-config?,security-role*,env-entry*,ejb-ref*)
>
> Here is my web.xml:
>
> <?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>
> <display-name>Networld News Alerts</display-name>
> <description>
> This web application allows administration of HTML/text
> email alerts.
> </description>
> <welcome-file-list>
> <welcome-file>index.html</welcome-file>
> <welcome-file>index.htm</welcome-file>
> <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
> <context-param>
> <param-name>test</param-name>
> <param-value>value</param-value>
> </context-param>
> </web-app>
>
>
> The problem seems to be the context-param element. When I take it out,
> things start up fine. I know context-param is valid, and it is even
> mentioned in the error, so what gives?
>
> Later,
> --
> \ Craig Patrick McDaniel
> /_\ Software Engineer
> /_/_\ n + 1, Inc.
> /_/_/_\ craigm@nplus1.net
> /_/_/_/_\ (502) 479-5557
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>