You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul Tomsic <pt...@yahoo.com> on 2002/10/02 18:37:07 UTC
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-config?,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-param*,servlet*,servle
t-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-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</servlet-class>
</servlet>
</web-app>
----------------------------
thoughts?
thanks,
Paul
ptomsic@yahoo.com
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>