Is the path to the config file something you can hard-code? If so, how about simply a class with a static initializer block to read the config file, then expose the values through a static getConfig() method returning a static HashMap? That's about as simple, light-weight and environment-agnostic solution as I can think of, IF you can live with hard-coding the path. Perhaps have the path a part of some app-specific config file that IS in your WAR, pointing to the config file OUTSIDE the WAR? That feels like it's getting a bit more complicated, but depending on how big a deal the hard-coding is to you, may not be a big deal.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

liooil wrote:
Hello world,

What would be the best pratice to get properties from an external file?
(I mean this file is not part of my war).
I'd like it to be read on servelt startup and properties to be be
available in servlet context ...
I though about a struts plugIn , but it seems a bit heavy solution.

Easier ?




___[ Pub ]____________________________________________________________ Inscrivez-vous gratuitement sur Tandaime, Le site de rencontres ! http://rencontre.rencontres.com/index.php?origine=4



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to