tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Serlvet init-param
Date Thu, 30 Jan 2003 21:52:01 GMT


On Thu, 30 Jan 2003, rf wrote:

> Date: Thu, 30 Jan 2003 11:16:08 -0800 (PST)
> From: rf <rufoo2001@yahoo.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message