You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by be...@canada.com on 2002/06/09 04:01:54 UTC

web.xml parsing error on startup.

Hello,
   I am using JDK1.4 and Tomcat 4.0.3, lately, I've been having this problems:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.3
PARSE error at line 29 column 11
org.xml.sax.SAXParseException: 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*,welco
me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
Starting service Tomcat-Apache
Apache Tomcat/4.0.3


My web.xml file is:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!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>
<welcome-file-list>
  <welcome-file>retrieveRecord.html</welcome-file>
</welcome-file-list>

<servlet>
<servlet-name>retrieveData</servlet-name>
<servlet-class>retrieveData</servlet-class>
<init-param>
  <param-name>driver</param-name>
  <param-value>org.gjt.mm.mysql.Driver</param-value>
</init-param>
<init-param>
  <param-name>jdbcurl</param-name>
  <param-value>jdbc:mysql://localhost:3306/techDB</param-value>
</init-param>
<init-param>
  <param-name>mysqluser</param-name>
  <param-value>demo</param-value>
</init-param>
</servlet>

</web-app>

I had to remove one after another, all my servlet nodes and I'mleft with one. I still have that parsing error?. This web.xml is according to the DTD, I can't figure out where theproblem is?.

Any help is appreciated. 

Line 29 is '</web-app>'   tag. 

regards,
Nik



__________________________________________________________
Get your FREE personalized e-mail at http://www.canada.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: web.xml parsing error on startup.

Posted by Markus Kirsten <ma...@iped.vxu.se>.
Hi Nik,
Read the error message carfully and change the order of the elements to 
conform to the error message (i.e. <servlet> before 
<welcome-file-list>). I had the same problem some time ago.

Order do matter!


Markus

On söndag, juni 9, 2002, at 04:01 , beelzabeb@canada.com wrote:

> Hello,
>    I am using JDK1.4 and Tomcat 4.0.3, lately, I've been having this 
> problems:
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.3
> PARSE error at line 29 column 11
> org.xml.sax.SAXParseException: 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*,welco
> me-file-list?,error-page*,taglib*,resource-env-ref*,resource-
> ref*,security-const
> raint*,login-config?,security-role*,env-entry*,ejb-
> ref*,ejb-local-ref*)".
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.3


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>