[EMAIL PROTECTED] wrote:

> Thanks for the suggestions. Here is how I started Tomcat.
>
> [eas@plutus easMail]$ CATALINA_HOME=$TOMCAT_HOME startup.sh
> Using CLASSPATH: 
>/home/src/Java/jakarta/dist/tomcat-4.0/bin/bootstrap.jar:/home/src/Java/jakarta/dist/tomcat-4.0/bin/servlet.jar:/home/src/Java/jakarta/dist/tomcat-4.0/bin/naming.jar:/usr/Java/jdk/lib/tools.jar
> Using CATALINA_HOME: /home/src/Java/jakarta/dist/tomcat-4.0
>
> Here are the first few lines of my web.xml
>
> <?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>
>   <resource-env-ref>
>     <resource-env-ref-name>ssl/factory</resource-env-ref-name>
>     <resource-env-ref-type>javax.net.ssl.SSLSocketFactory</resource-env-ref-type>
>   </resource-env-ref>
>   <servlet> <!-- line 12 -->
>     <servlet-name>easMail</servlet-name>
>
> And Here are the appropriate lines from the localhost log.
>
> 2001-01-03 15:55:36 ContextConfig[/easMail] Parse error in application web.xml
> org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet" here.
>         at org.apache.crimson.parser.Parser2.error(Parser2.java:3008)
>         at
> 
>org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(ValidatingParser.java:349)
> 2001-01-03 15:55:36 ContextConfig[/easMail]: Occurred at line 12 column -1
>

Ah, so it *is* validating.  I misunderstood you, and thought the problem is that it 
was not catching validity errors.

>
> I may be reading the DTD wrong, but my xemacs thinks I can have a
> servlet there, and from my reading of the DTD I do to. Can you give me
> a clue?
>

Yep.

The elements in the DTD must be defined in the order they are listed for the "web-app" 
element.  In your case above, all of the <servlet> definitions must preceed all of the 
<resource-env-ref> definitions.

No, I don't particularly like the order dependencies either, but its there and we have 
to live with it.

>
> Thanks
>

Craig



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

Reply via email to