Howdy,
1. Can you verify the web.xml against the DTD (by using any xml
validator, e.g. XMLSpy) ?

2. Why are you using a servlet specification v2.2 DTD and not v2.3?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Jiann-Ming Su [mailto:[EMAIL PROTECTED]
>Sent: Thursday, June 19, 2003 12:00 PM
>To: Tomcat Users List
>Subject: Element "web-app" does not allow "servlet" here.
>
>I'm using jakarta-tomcat-4.1.24-LE-jdk14 with java version 1.4.1_02 on
>Linux.  For some reason, I'm starting to get the following errors from
my
>web.xml:
>
>SEVERE: Parse Error at line 24 column -1: Element "web-app" does not
allow
>"servlet" here.
>org.xml.sax.SAXParseException: Element "web-app" does not allow
"servlet"
>here.
>        at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
>        at
>org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(Va
lida
>tingParser.java:34
>9)
>        at
>org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1317)
>        at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
>        at
>org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
>        at
>org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
>        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>        at
>org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
>        at
org.apache.commons.digester.Digester.parse(Digester.java:1543)
>        at
>org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConf
ig.j
>ava:282)
>        at
>org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)
>        at
>org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.
java
>:243)
>        at
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
>rt.java:166)
>        at
>org.apache.catalina.core.StandardContext.start(StandardContext.java:356
7)
>        at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
ava:
>821)
>        at
>org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>        at
>org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>        at
>org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeplo
yer.
>java:307)
>        at
>org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
>        at
>org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:492)
>        at
>org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:400)
>        at
>org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
>        at
>org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:3
58)
>        at
>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
uppo
>rt.java:166)
>        at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>        at
>org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>        at
>org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>        at
>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>        at
>org.apache.catalina.core.StandardService.start(StandardService.java:497
)
>        at
>org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
>        at
org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>        at
org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>        at
org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
va:3
>9)
>        at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
rImp
>l.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:324)
>        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>
>
>The exact same web xml file was working fine for me yesterday.  It's
still
>working fine today for my co-worker, who's running a different instance
of
>tomcat.  We are both working out of the same repository.  I've checked
on
>the web and newsgroups, and people seem to only say to make sure that
><servlet-mapping> come after <servlet>.  I don't have any
<servlet-mapping>
>tags.  As reference, I've included my web.xml.  Thanks for any help.
>
>--
>Jiann-Ming Su  [EMAIL PROTECTED]  404-712-2603
>Development Team Systems Administrator
>General Libraries Systems Division



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to