tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: web.xml parser error
Date Wed, 05 Nov 2003 14:42:14 GMT
Your xml is not valid with respect to the dtd. IE can say a document is 
well-formed but can't say a document is valid.

All <servlet> elements must appear before any <servlet-mapping>

See http://java.sun.com/dtd/web-app_2_3.dtd

-Tim

Antony Paul wrote:

> I could open the file in IE .
> 
> I am including my web.xml(a shorter form)
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!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 context</display-name>
>  <description>Application desc</description>
>  <listener>
>   <listener-class>util.ContextListener</listener-class>
>  </listener>
> 
>  <servlet>
>   <servlet-name>LoginServlet</servlet-name>
>   <servlet-class>LoginServlet</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>LoginServlet</servlet-name>
>   <url-pattern>/LoginServlet</url-pattern>
>  </servlet-mapping>
> 
>  <servlet>
>   <servlet-name>sa/OperationPasswordServlet</servlet-name>
>   <servlet-class>sa.OperationPasswordServlet</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>sa/OperationPasswordServlet</servlet-name>
>   <url-pattern>/sa/OperationPasswordServlet</url-pattern>
>  </servlet-mapping>
> 
>  <resource-ref>
>       <description>DB Connection Pool</description>
>       <res-ref-name>jdbc/Database</res-ref-name>
>       <res-type>javax.sql.DataSource</res-type>
>       <res-auth>Container</res-auth>
>  </resource-ref>
> </web-app>
> 
> Antony Paul
> 
> 
> ----- Original Message -----
> From: "Tim Funk" <funkman@joedog.org>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, November 05, 2003 7:52 PM
> Subject: Re: web.xml parser error
> 
> 
> 
>>(probably) http://jakarta.apache.org/tomcat/faq/misc.html#baddtd
>>
>>-Tim
>>
>>Antony Paul wrote:
>>
>>
>>>It is printed on stderr.log. Every context is working.  I found the xml
> 
> file
> 
>>>by editing each xml file and looking for change of line number in error
>>>message. Servlet mapping is causing problem. But one interesting thing
> 
> is
> 
>>>that every time it is pointing to last line of the file. What does this
> 
> mean
> 
>>>?
>>>
>>>Antony Paul
>>>
>>>----- Original Message -----
>>>From: "Christopher Schultz" <christopher.d.schultz@comcast.net>
>>>To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>>>Sent: Wednesday, November 05, 2003 7:42 PM
>>>Subject: Re: web.xml parser error
>>>
>>>
>>>
>>>
>>>>Antony,
>>>>
>>>>
>>>>
>>>>>am getting this error. Is it possible to know which web.xml caused the
>>>
>>>error
>>>
>>>
>>>>>?
>>>>>
>>>>>[ERROR] Digester - -Parse Error at line 70 column 11: The content of
>>>
>>>element
>>>
>>>
>>>>>type "web-app" must match
>>>>
>>>>Which log file is this in? It's probably in the log file for a
>>>>particular context. If that's the case, then you know which web.xml file
>>>>to look at.
>>>>
>>>>If not, (perhaps it's in catalina.out), then check the log messages
>>>>previous to this one. You might get an indication of which context was
>>>>trying to start.
>>>>
>>>>-chris
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message