tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Two servlets
Date Wed, 07 Nov 2001 18:57:00 GMT

	You are assigning both servlets to listen for the same URL (anything
that starts with /servlets/*).  This can not happen - each URL can be
serviced by at most one servlet (although the servlet can pass control to
other servlets).  You need to assign each servlet its own unique URL pattern
(i.e. /servlets/da/* and /servlets/title/*).

	Randy


> -----Original Message-----
> From: Mihai Gheorghiu [mailto:tanethq@earthlink.net]
> Sent: Wednesday, November 07, 2001 2:32 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Two servlets
> 
> 
> I want to use two servlets from the same applet/web page, and 
> it does not
> work. I'm doing something definitely wrong in web.xml, as 
> tomcat.log lists
> (among others):
> 2001-11-07 03:03:37 - Ctx( /development ): Removing duplicate
> /servlet/* ->TitlesServlet(Sales.TitlesServlet/null)
> The relevant web.xml part is:
>  <servlet>
>   <servlet-name>TitlesServlet</servlet-name>
>   <servlet-class>Sales.TitlesServlet</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>TitlesServlet</servlet-name>
>   <url-pattern>/servlet/*</url-pattern>
>  </servlet-mapping>
>  <servlet>
>   <servlet-name>DaServlet</servlet-name>
>   <servlet-class>Sales.DaServlet</servlet-class>
>  </servlet>
>  <servlet-mapping>
>   <servlet-name>DaServlet</servlet-name>
>   <url-pattern>/servlet/*</url-pattern>
>  </servlet-mapping>
> How do I declare more than one servlet being used from one applet?
> Thank you all.
> 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message