Re: Application configuration: how to read files from a web application

2006-05-18 Thread Hans Sowa
Hi Download the log4j Source from Apache. Look at the class org.apache.log4j.helpers.Loader and here you will a logic which is used to find the log4j.xml. This works for every application. Hope this will help. On 5/17/06, Tim Lucia <[EMAIL PROTECTED]> wrote: I have always responded with this

RE: Application configuration: how to read files from a web application

2006-05-17 Thread Tim Lucia
I have always responded with this http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html when this question comes up. It explains the most common ways to find and load resource files. It does not get specifically into servlets, however, or ServletContext.getResource[AsStream

RE: Application configuration: how to read files from a web application

2006-05-17 Thread Asaf Lahav
LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Mark Petrovic [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 17, 2006 11:31 AM To: Tomcat Users List Subject: Re: Application configuration: how to read files from a web application

Re: Application configuration: how to read files from a web application

2006-05-17 Thread Mark Petrovic
Asaf, hello. Good question and I don't know of any best practices. Others here may. With the default security policy (running without "-security") I have not attempted to write data from a web application, excluding of course activities such as log messages or writing to sockets connected to a

RE: Application configuration: how to read files from a web application

2006-05-17 Thread Asaf Lahav
Hi Mark, Is there a best practice for also writing/updating configuration file from within the application? Asaf Lahav VP R&D, Prima Grid LTD. Cellular: 972-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Mark Petrovic [mailto:[EMAIL PROTECTED

Re: Application Configuration

2006-05-16 Thread Mark Thomas
Mark Petrovic wrote: > I can help you off list. Please mail me directly. Doing things off-list is generally a bad idea as the Tomcat community as a whole is unable to benefit from the experience. Mark - To unsubscribe, e-mail:

Re: Application Configuration

2006-05-14 Thread Mark Petrovic
Users List Subject: Re: Application Configuration You can put those types of resources in your .war file and access them as "resources". servlet.getClass().getResource("xmlfile.xml"); type of scheme. On 5/8/06, Asaf Lahav <[EMAIL PROTECTED]> wrote: > > Hi ev

RE: Application Configuration

2006-05-14 Thread Asaf Lahav
2-54-4717955 Phone: 972-3-6540255 Fax: 972-3-6540254 -Original Message- From: Mark Petrovic [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 8:10 PM To: Tomcat Users List Subject: Re: Application Configuration You can put those types of resources in your .war file and ac

Re: Application Configuration

2006-05-08 Thread Mark Petrovic
You can put those types of resources in your .war file and access them as "resources". servlet.getClass().getResource("xmlfile.xml"); type of scheme. On 5/8/06, Asaf Lahav <[EMAIL PROTECTED]> wrote: Hi everybody, I still need help on this. Please read below… *Asaf Lahav* *VP R&D, Prim

RE: Application Configuration

2006-05-08 Thread Asaf Lahav
Hi everybody,   I still need help on this. Please read below…   Asaf Lahav VP R&D, Prima Grid LTD. Cellular:  972-54-4717955 Phone:   972-3-6540255 Fax:   972-3-6540254 From: Asaf Lahav [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 11:30 AM To: users@tomca

RE: Application Configuration

2006-05-08 Thread Tim Lucia
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 Input