Re: Handling config files

2005-12-09 Thread Sebastian Stein
[EMAIL PROTECTED] <[EMAIL PROTECTED]> [051208 23:27]: > There are probably many ways of doing this (I don't know of any "standard" > way though). Here's some code which i use to populate a Properties object > from a file: > > String xpdlPropertiesFileName = "xpdl.properties"; //file should be in

Re: Handling config files

2005-12-08 Thread gramani
Sebastian Stein <[EMAIL PROTECTED]> wrote on 12/08/2005 05:31:36 PM: > [EMAIL PROTECTED] <[EMAIL PROTECTED]> [051208 23:27]: > > String xpdlPropertiesFileName = "xpdl.properties"; //file should be in the > > class path.. > > Sorry for the stupid question, but what are possible class paths in a

Re: Handling config files

2005-12-08 Thread Sebastian Stein
[EMAIL PROTECTED] <[EMAIL PROTECTED]> [051208 23:27]: > String xpdlPropertiesFileName = "xpdl.properties"; //file should be in the > class path.. Sorry for the stupid question, but what are possible class paths in a webapp? I guess it is the WEB-INF/lib directory, but any other directory? Can thi

Re: Handling config files

2005-12-08 Thread gramani
Hi Sebastain, There are probably many ways of doing this (I don't know of any "standard" way though). Here's some code which i use to populate a Properties object from a file: String xpdlPropertiesFileName = "xpdl.properties"; //file should be in the class path.. InputStream is = null; ClassLo

Re: Handling config files

2005-12-08 Thread Frank W. Zammetti
No, believe it or not, there's no standard way of doing this. One option is here: http://javawebparts.sourceforge.net/javadocs/javawebparts/listener/AppConfigContextListener.html ...which is part of Java Web Parts: http://javawebparts.sourceforge.net This is a ContextListener which makes it e

Handling config files

2005-12-08 Thread Sebastian Stein
Hi, I have a config file in WEB-INF/classes/ directory. This file has the information for database connection. How can I make this file accessible in all Action classes? I guess there must be a unified way to access such a file. Sebastian