On Thu, 30 Jan 2003, rf wrote:

> Date: Thu, 30 Jan 2003 11:16:08 -0800 (PST)
> From: rf <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Serlvet init-param
>
> Another question, a basic one:
>
>  <servlet>
>           <servlet-name>servletone</servlet-name>
>       <servlet-class>my.Servlet</servlet-class>
>       <init-param>
>               <param-name>hi</param-name>
>               <param-value>foo</param-value>
>       </init-param>
>     </servlet>
>
>  <servlet>
>         <servlet-name>servlettwo</servlet-name>
>       <servlet-class>my.Servlet</servlet-class>
>       <init-param>
>               <param-name>hi</param-name>
>               <param-value>bar</param-value>
>       </init-param>
>     </servlet>
>
>
> I have two servlet-names defined above with the same
> Servlet class, the params are different. This setup
> actually works with me, but I dont know why it works.
>
> How many instances of my.Servlet are there in this
> case? is it two? or only one?
>

Two.

The rule is one instance per servlet definition (i.e. one per <servlet>
element), not one per servlet class.

> Thank you,
> ~rf

Craig

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

Reply via email to