[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Re: Handling config files
From:       Sebastian Stein <seb.stein () hpfsc ! de>
Date:       2005-12-09 14:36:54
Message-ID: 20051209143654.GA3032 () hpfsc ! de
[Download RAW message or body]

gramani@intellicare.com <gramani@intellicare.com> [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 the 
> class path..
> InputStream is = null;
> ClassLoader loader = Thread.currentThread().getContextClassLoader();
> is = loader.getResourceAsStream(xpdlPropertiesFileName);

Thanks, I tried this and it works great!

Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic