The "correct" way in J2EE is, I believe, to use JNDI to access external
resources, such as property files. And as anyone whose tried it will tell
you, it's simply not worth the effort. Each app server configures them
differently, and it often requires tedious hand editing of xml files to set
them up.

Like many of the other responders, we use a known location outside the
application server. By including the context root in the path to the
property files (such as /MyApp/MyContextRoot) it's possible to have multiple
versions of the same war running on the server, with different property


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Clapham, Paul
Sent: 01 November 2005 17:25
To: Java Programming on and around the iSeries / AS400
Subject: [Maybe Spam] RE: Properties Files vs. War/Ear files

I don't know if this is considered kosher, but I put those properties in a
predetermined location outside the web application.


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Walden H. Leverich
Sent: November 1, 2005 09:01
To: Java Programming on and around the iSeries / AS400
Subject: Properties Files vs. War/Ear files

If I understand the concept correctly, one should put their "softcoded"
things into a properties file. This could be connection strings (if you're
not using WebSphere data sources), Web Services addresses, URLs you access
that are different between test and production, etc.
Now, the properties file is "wrapped" into the WAR file that's deployed to
websphere. So, once deployed you go into the properties file and make your
changes? Am I good so far? If so, what's the process for deploying updates?
If I re-deploy the WAR file then I'll overwrite the properties file, so I
have to make my changes again? 
Is there a way to exclude the properties file from the WAR and have WS leave
it on the server?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.