tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Pitmon ...@digitalcyclone.com>
Subject two servlets sharing the same properties? (scope issue?)
Date Tue, 15 Apr 2003 23:41:20 GMT
Hi,

I am running TC3.3.

I have two servlets, that both use the same class, and both read in
properties files that are similar.

What's happening is that when the second servlet initializes, reading
the properties from a file, it changes the configuration of the first
servlet.

Basically, here's what my two similar servlet defs in my web.xml file
look like:

<servlet>
 <servlet-name>
   ServletNumberOneIndex
 </servlet-name>
 <servlet-class>
   com.digcy.server.WhatEver
 </servlet-class>
 <init-param>
   <param-name>properties</param-name>
     <param-value>/home/httpd/html/WEB-INF/lib/one.prop</param-value>
 </init-param>
</servlet>

<servlet>
 <servlet-name>
   ServletNumberTwoIndex
 </servlet-name>
 <servlet-class>
   com.digcy.server.WhatEver
 </servlet-class>
 <init-param>
   <param-name>properties</param-name>
     <param-value>/home/httpd/html/WEB-INF/lib/two.prop</param-value>
 </init-param>
</servlet>

It seems like some sort of scope issue.  Is this normal? Someone
suggested I look for things as static in the class, and there's nothing
near where the properties files are read in.  Do I have to specify that
each servlet needs to not share with the others..?  These servlets are
in the same context, and they have different values for the same keys in
the properties files, but they are different servlets..

thanks for any help,

-Ray



---------------------------------------------------------------------
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