Good Morning Robert

It *sounds* as if you may have one of 2 situations to deal with

a ClassLoader issue which by default goes to ClassLoader for the referenced class e.g. this.getClass().getClassLoader
http://java.sun.com/j2se/1.4.2/docs/api/java/util/ResourceBundle.html#getBundle(java.lang.String,%20java.util.Locale,%20java.lang.ClassLoader)

The other scenario is that it is possible your base parameter is incorrect in which case you want to look at "specifying a path name (using "/") instead of a fully qualified class name (using ".")"

Anyone else?
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- From: "Robert Soeding" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Wednesday, May 23, 2007 8:37 AM
Subject: WebApps not isolated


Hi, since this is my first posting in this mailing list, I would like to thank you very much for providing and maintaining Tomcat.

I'm using Tomcat 5.5.20 and .23, Sun Java 1.5.x, on Ubuntu 7.04.

I've deployed two identical WebApps, webapp1 and webapp2, by letting Tomcat unpack two WAR files. Next I changed $CATALINA_HOME/webapps/webappX/WEB-INF/classes/myProps.properties in both webapps to point to different databases. Next, I restarted Tomcat.

The code to access properties is simply,
   ResourceBundle.getBundle("myProps").getString(key);

The problem is, both webapp1 and webapp2 access the same myProps.properties (webapp2 access webapp1's myProps.properties). When I undeploy webapp1, webapp2 will use its own properties file again.

As an additional test, I downloaded a fresh copy of Tomcat, deployed both webapps, edited myProps.properties, and ran this fresh instance. In this instance, webapp1 would use the properties file of webapp2 (while in the other instance of Tomcat, webapp2 would access webapp1's properties file).

Anyways, both webapps are not isolated properly.

On another server I was not able to reproduce this behavior, using the same WAR files.

I've also looked for JARs that might contain the properties file in the $CLASSPATH, $CATALINA_HOME/common/* and $CATALINA_HOME/webapps/webapp1/WEB-INF/lib, but such a JAR does not exist. Moreover, different properties files are used, probably, depending on which webapp is loaded first.

Any ideas?

Thanks
Robert

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to