I am sure someone else can explain the "how" much better than me.  These
things have been posted in this board several times.

But I'd like to suggest that you don't "just" put the XML config file
in the webapp.  You really want to do both.  A few days ago someone
mentioned the name of an environment variable that if passed at app
server startup (with -D... option) it would say where to pick up the
log4j file.  

So... if it is not defined:  Your app gets the config file from the WAR
or EAR.  If it is defined:  Your app gets it from the path specified. 
The beauty of this is (a) easy deployment and protection of the config
file, but also (b) ability to tweak the DEBUG/INFO/... level for the
various pieces during development.

I have been using this approach for over a year and I love it.  My logs
usually logs NOTHING (at INFO level) unless there is an error.  During
development I turn on DEBUG just for the classes that I am working with,
so that I am not overwhelmed by noise.  It's great.

Bruno Melloni
Director of Software Architecture
Akuratus Corporation
1333 N. Stemmons Fwy, Suite 110
Dallas, Texas 75207
Phone: 469.227.0920
Fax: 469.227.0967
[EMAIL PROTECTED]
www.akuratus.com

>>> [EMAIL PROTECTED] 6/20/2005 7:44:55 PM >>>
Hi,

Is there somebody out there which can provide an example of how I can 
load a XML config file from a jar?
The idea is to add i.e. appl.xml to a jar and call 
DOMConfigurator.configure("appl.xml") within the application.

I would like to hide part of the configuration from the end-users to 
avoid that they make changes to parts of the configuration.

Other ideas are welcome as well.
Another path I walked was to do the 'hidden' part within the code, but
I 
could find a way to add the rendering info into th repository. So,
ideas 
or hints on how to do that are welcome as well.

Thanks

-- Eric.


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