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]



Reply via email to