On 9/29/05, matador [EMAIL PROTECTED] wrote:
Leon Rosenberg [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
now how exactly writing a thread which polls the db is less messy,
than writing a thread that polls a file?
regards
leon
no need for threads with db. change the val in
Leon Rosenberg [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
First: you can load your property files on each request as well.
really, using what? im curious -- struts and regular properties files out
of the box dont support that behaviour, so you would have to 'roll your
own' i think.
From: news [mailto:[EMAIL PROTECTED] On Behalf Of matador
Subject: Re: Flexible way of defining application variables
in text format?
First: you can load your property files on each request as well.
really, using what?
Try the java.util.Properties.load() method. You can check
database. using props files you have to bounce the app to get changes to
take effect unless you write your own properties loader that runs as a
thread, or checks file timestamps, etc.
imo, its all too messy, db based config is far superior
now how exactly writing a thread which polls the
Leon Rosenberg [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
now how exactly writing a thread which polls the db is less messy,
than writing a thread that polls a file?
regards
leon
no need for threads with db. change the val in the db then the next time
the page loads, the new
Hi,
Just enter your variables into a text file called abc.properties with
name/value pairs, e.g
var1=val1
var2=val2
Although these will not automatically appear in application scope. You will
need to write a tiny Servlet that you configure in web.xml, pass the filename
as a servlet
To make this easier in the presentation tier, you would probably want to make
this method a static member of some class (if using scriplet), or a tag if
attempting a non-scripted presentation tier (recommended).
Allistair.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL
On Tuesday 27 September 2005 15:36, Seak, Teng-Fong wrote:
My webapp needs some application string variables for
configuration. For the moment, I hard-code them as class static
properties and compiled. But I'd like to know if there's any method to
define such variables in a text file,
NoKideen wrote:
On Tuesday 27 September 2005 15:36, Seak, Teng-Fong wrote:
My webapp needs some application string variables for
configuration. For the moment, I hard-code them as class static
properties and compiled. But I'd like to know if there's any method to
define such variables in
From: NoKideen [mailto:[EMAIL PROTECTED]
Subject: Re: Flexible way of defining application variables
in text format?
Try this API Class file
Is there some reason you went to all this trouble rather than using
java.util.Properties?
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL
I use a properties file stored in the WEB-INF directory. Modifying the
web.xml is too error prone. Using another XML file is a lot harder than a
properties file. Just use the servlet context getResourceAsStream(), and
pass that to the properties.load() method.
George Sexton
MH Software, Inc.
On Tuesday 27 September 2005 16:48, Jilles van Gurp wrote:
NoKideen wrote:
this is example to to read
-
import lib.ConfLineSeparator;
...
...
ConfLineSeparator c = new
ConfLineSeparator(/whereis/thefile/file.conf);
From: NoKideen [mailto:[EMAIL PROTECTED]
Subject: Re: Flexible way of defining application variables
in text format?
is there any example, I'd still confuse how to read dot
properties file
I think may API was to odds :-D, yeah that was trouble
but there is one thing I like
Seak, Teng-Fong [EMAIL PROTECTED] wrote in news:4339048E.30608
@yahoo.com:
My webapp needs some application string variables for
configuration. For the moment, I hard-code them as class static
properties and compiled. But I'd like to know if there's any method to
define such
14 matches
Mail list logo