You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dionisio Ruiz de Zarate <di...@tinieblas.com> on 2003/01/07 13:31:07 UTC

configuring two servlets into my application

i am tryin of configuring two test servlets in mytomcat application but when
i try to declare them into the web.xml appears error:
This file is not valid.
unexpected child element 'servlet'

the configuration is:
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>HelloWorld</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>HolasAlMundo</servlet-name>
<servlet-class>HolasAlMundo</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HolasAlMundo</servlet-name>
<url-pattern>HolasAlMundo</url-pattern>
</servlet-mapping>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: configuring two servlets into my application

Posted by David Hemingway <db...@kooee.com.au>.
Dionisio,

The child <servlet> must be inside a <web-app> element. Is this the case in
your setup? You can verify your web.xml is of the correct type by looking at
the DTD, this can be found here:
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd

regards,
Dave


----- Original Message -----
From: "Dionisio Ruiz de Zarate" <di...@tinieblas.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, January 07, 2003 11:31 PM
Subject: configuring two servlets into my application


> i am tryin of configuring two test servlets in mytomcat application but
when
> i try to declare them into the web.xml appears error:
> This file is not valid.
> unexpected child element 'servlet'
>
> the configuration is:
> <servlet>
> <servlet-name>HelloWorld</servlet-name>
> <servlet-class>HelloWorld</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>HelloWorld</servlet-name>
> <url-pattern>HelloWorld</url-pattern>
> </servlet-mapping>
> <servlet>
> <servlet-name>HolasAlMundo</servlet-name>
> <servlet-class>HolasAlMundo</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>HolasAlMundo</servlet-name>
> <url-pattern>HolasAlMundo</url-pattern>
> </servlet-mapping>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>