Interesting.

I had a quick browse of the servlet spec and it doesn't seem to say either
that you can or cannot do this.

However these guys seems to reckon it works on TC: 
http://archives.java.sun.com/cgi-bin/wa?A2=ind0103&L=servlet-interest&F=&S=&;
P=50479 

If it is possible, your config looks fine to me.

> -----Original Message-----
> From: Dana Cordes [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday 10 November 2004 22:37
> To: [EMAIL PROTECTED]
> Subject: Multiple Servlet Mapping Problem
> 
> 
> Is it possible to have two separate servlets, with separate 
> configurations pointing to the same class? 
> 
> Here's my situation, I have a servlet class that has several 
> init-parameters.  I want to have a second instance of that 
> same servlet 
> running with different parameters.  But it doesn't seem to be working 
> properly. 
> 
> Here's an excerpt from my web.xml:
> <servlet>
>   <servlet-name>MasterControl</servlet-name>
>   <servlet-class>com.foo.bar.core.MasterControl</servlet-class>
>   <init-param>
>     <param-name>CONTROL_PARAMETER_NAME</param-name>
>     <param-value>command1</param-value>
>   </init-param>
> </servlet>
> <servlet>
>   <servlet-name>MasterControlURA</servlet-name>
>   <servlet-class>com.foo.bar.core.MasterControl</servlet-class>
>   <init-param>
>     <param-name>CONTROL_PARAMETER_NAME</param-name>
>     <param-value>command2</param-value>
>   </init-param>
> </servlet>
> <servlet-mapping>
>   <servlet-name>MasterControl</servlet-name>
>   <url-pattern>/aop</url-pattern>
> </servlet-mapping>
> <servlet-mapping>
>   <servlet-name>MasterControlURA</servlet-name>
>   <url-pattern>/ura</url-pattern>
> </servlet-mapping>
> 
> What I see is both mapping running, but only displaying the 
> config from 
> the first servlet definition.  Is there something special 
> that I have to 
> do to get this running correctly?  Is it even possible?
> 
> -Dana Cordes
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



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

Reply via email to