The commas in the DTD declaration for the <web-app> element
(i.e. the commas in "(icon?,display-name?,...") dictate
that these elements *must* occur in the sequence specified.
The sequence of the <resource-ref> and <servlet> elements
in your web.xml *do not match* the DTD sequence specified
for the <web-app> element.  Thus, the "must match" error.

Cheers,
Larry

> -----Original Message-----
> From: Paul Tomsic [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, October 02, 2002 12:37 PM
> To: [EMAIL PROTECTED]
> Subject: web.xml conflict with element tags SERVLET and 
> RESOURCE-REF ? help?
> 
> 
> Does anyone know anything about a conflict in the
> web.xml file when using both the <resource-ref>
> tag AND the <servlet> tag?
> 
> Apache1.3/Tomcat4.1.12 on Linux.
> 
> When my web.xml file contains both tags (see below for
> example) I get the following error in the catalina.out
> file:
> -----------------------------
> 6 [main] ERROR digester.Digester  - Parse Error at
> line 21 column 11: The conten
> t of element type "web-app" must match
> "(icon?,display-name?,description?,distri
> butable?,context-param*,servlet*,servlet-mapping*,session-conf
> ig?,mime-mapping*,
> welcome-file-list?,error-page*,taglib*,resource-ref*,security-
> constraint*,login-
> config?,security-role*,env-entry*,ejb-ref*)".
> org.xml.sax.SAXParseException: The content of element
> type "web-app" must match
> "(icon?,display-name?,description?,distributable?,context-para
m*,servlet*,servle
> t-mapping*,session-config?,mime-mapping*,welcome-file-list?,er
> ror-page*,taglib*,
> resource-ref*,security-constraint*,login-config?,security-role
> *,env-entry*,ejb-r
> ef*)".
> --------------------------------
> 
> But when I use only one or the other of these tags, I
> get no error.  Is there a way to have both elements
> live in the same web.xml?
> The reason I'm trying to do this is to take advantage
> of web pooling and JNDI.
> 
> Here's my web.xml file:
> 
> --------------
> 
> <?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>
>     <description>Amedd | Agilis
> Application</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>user</servlet-name>
>        
> <servlet-class>com.mycompany.server.UserManagementModule</serv
let-class>
>     </servlet>
> </web-app>
> 
> ----------------------------
> 
> thoughts?
> 
> thanks,
> Paul 
> [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to