Suggested practice is to put any property files, XML files, resource(s) of
any kind beneath WEB-INF/classes (or WEB-INF/lib, if a jar).  Then you can
load them using one of the mechanisms here:

 

http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html

 

Once you have an InputStream pointing to the desired resource, you may read
it using your favorite mechanism (Digester, DOM parser, your own parse,
java.util.Properties, etc.)

 

Following these two bits of information will allow your app to work in .war
format, or exploded war (directory) format.

 

Tim

 

 

  _____  

From: Asaf Lahav [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 08, 2006 5:30 AM
To: users@tomcat.apache.org
Subject: Application Configuration

 

Hi all,

 

I'm building a web services application that requires configuration xml
files.

Is there a location where I should put the xml configuration files? 

Is there a best practice saying where to put configuration files?

If there is, how am I expected to get the configuration info from there?

 

Thanks in advance,

 

Asaf Lahav

VP R&D, Prima Grid LTD.

Cellular:  972-54-4717955

Phone:   972-3-6540255

Fax:       972-3-6540254



 

Reply via email to