You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Selvaraj N <se...@india.hp.com> on 2000/12/12 22:58:22 UTC

Reloadable property for more than one servlet instances

Hi,
This is regarding the problem with relodable property that is set for an
application.
Problem:
--------
* In server.xml, the application's (toms) context has been defined with
relodable="true".
	<Context path="/toms" 
                 docBase="webapps/toms"
                 reloadable="true" > 
        </Context>
* In web.xml, one servlet has been mapped to two servlet-names and the
two servlet-names have been accessed using two different url-patterns.
    <servlet>
        <servlet-name>counter</servlet-name>
        <servlet-class>counter.SimpleCounter</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>counter</servlet-name>
        <url-pattern>/counter.selva</url-pattern>
    </servlet-mapping>

    <servlet>
        <servlet-name>counter2</servlet-name>
        <servlet-class>counter.SimpleCounter</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>counter2</servlet-name>
        <url-pattern>/counter_2.selva</url-pattern>
    </servlet-mapping>

* Now, the SimpleCounter.java has been modified while the server&engine
are up and running. If the servlet instance named "counter" is accessed,
it is reflecting the modifications in the java source. I mean new
instance has been created. This is fine. But, when the servlet instance
named "counter2" is accessed, it DOESN'T reflect the modifications in
the java source. I think that there is no new instance created after the
class has been reloaded after the modification.

* Is the "relodable" property applies for all the servlet instances in
the application or what could be the problem?

* This application has been tested on NT platform.

* Can any one help to get rid of this problem?

Thanks in advance,
Selva