• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WebApps not isolated in Tomcat?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, there is a Tomcat 5.5 instance, and I've deployed two webapps by dropping the WAR files into the webapps folder.
The database connection string, respectively, is read from a properties file, which resides in WEB-INF/classes.
The code to read a property is simply,


Now, the problem is, both webapps are using the same properties file, the one of webapp1.

I made sure that's a fact, and also made sure there are no offending JARs in $CLASSPATH, $TOMCAT_HOME/webappX/WEB-INF/lib or $TOMCAT_HOME/common.

Any ideas???

Thanks
Robert

Edit: BTW, the method that retrieves the values from the properties file is static.
Edit: Strange enough, some legacy webapps within the same Tomcat instance are throwing errors now, because Java method signatures have changed.
Thus, actually a set of WEB-INF/classes gets loaded from other webapps(!).

[ May 23, 2007: Message edited by: Robert Gorn ]
[ May 23, 2007: Message edited by: Robert Gorn ]
 
There's a way to do it better - find it. -Edison. A better tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic