|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
properties file for Red5 application - How to?Hi,
I need to load a properties file within my Red5 application. I am using : properties.load(new FileInputStream("data.properties")) to load up the properties from a file.
I placed data.properties inside WEB-INF and WEB-INF/lib, but Red5 still can't pick it up and I get FileNotFoundException.
How do I get the properties file to work?
Thanks in advance for your help.
Pete _______________________________________________ Red5 mailing list Red5@... http://osflash.org/mailman/listinfo/red5_osflash.org |
|
|
Re: properties file for Red5 application - How to?IScope scope = Red5.getConnectionLocal().getScope(); Resource propertyFile = scope.getResource("data.properties");BufferedReader br = new BufferedReader(new FileReader(propertyFile.getFile())); dunno if thats any help :-) James Date: Wed, 23 Jul 2008 22:18:01 +0800 From: petedao@... To: red5@... Subject: [Red5] properties file for Red5 application - How to? Hi,
I need to load a properties file within my Red5 application. I am using : properties.load(new FileInputStream("data.properties")) to load up the properties from a file.
I placed data.properties inside WEB-INF and WEB-INF/lib, but Red5 still can't pick it up and I get FileNotFoundException.
How do I get the properties file to work?
Thanks in advance for your help.
Pete Get fish-slapping on Messenger! Play Now _______________________________________________ Red5 mailing list Red5@... http://osflash.org/mailman/listinfo/red5_osflash.org |
|
|
Re: properties file for Red5 application - How to?Any resource you want to load without a path simply needs to be put in
the WEB-INF/classes directory. On 7/23/08, james taylor <jimothyinnewcy@...> wrote: > > Have you tried something like this: > > IScope scope = Red5.getConnectionLocal().getScope(); > Resource propertyFile = scope.getResource("data.properties"); > > BufferedReader br = new BufferedReader(new > FileReader(propertyFile.getFile())); > > > dunno if thats any help :-) > > James > > > > > Date: Wed, 23 Jul 2008 22:18:01 +0800From: petedao@...: > red5@...: [Red5] properties file for Red5 application - How > to? > > Hi, > > I need to load a properties file within my Red5 application. I am using : > properties.load(new FileInputStream("data.properties")) to load up the > properties from a file. > > I placed data.properties inside WEB-INF and WEB-INF/lib, but Red5 still > can't pick it up and I get FileNotFoundException. > > How do I get the properties file to work? > > Thanks in advance for your help. > > Pete > _________________________________________________________________ > Invite your Facebook friends to chat on Messenger > http://clk.atdmt.com/UKM/go/101719649/direct/01/ -- http://gregoire.org/ http://osflash.org/red5 _______________________________________________ Red5 mailing list Red5@... http://osflash.org/mailman/listinfo/red5_osflash.org |
|
|
Re: properties file for Red5 application - How to?Hi,
I am putting the data.properties inside the classes dir but it still can't find it.
Any idea why?
Thanks,
Pete
On Wed, Jul 23, 2008 at 10:30 PM, Mondain <mondain@...> wrote: Any resource you want to load without a path simply needs to be put in _______________________________________________ Red5 mailing list Red5@... http://osflash.org/mailman/listinfo/red5_osflash.org |
|
|
Re: properties file for Red5 application - How to?Hi try this code
try { Properties playbackConf = new Properties(); playbackConf.load(new FileInputStream(System.getProperty("red5.root") + File.separator + "conf" + File.separator + "data.properties")); } catch (Exception e) { System.out.println("Conf not found"); playbackConf = null; } } place your properties file the red5/conf folder
|
| Free Forum Powered by Nabble | Forum Help |