I like to have a simple "Settings" or "Config" table in the database,
having just VARCHAR "name" and "value" columns, and a simple Tapestry
IOC service that looks up and caches the values (either lazily or at
startup time). Another option is to have the settings in a property
file (outside the war), of course, but on the other hand having them
in the database makes it easier to later create crud interfaces for
those that may need to change at run time.

On Wed, Sep 28, 2011 at 12:53 PM, Kalle Korhonen
<kalle.o.korho...@gmail.com> wrote:
> I typically have a bunch of application specific symbols since they
> allow so much flexibility. Set the defaults in AppModule, override
> with jvm system properties, in your setup scripts for production
> environment etc.
>
> Kalle
>
>
> On Wed, Sep 28, 2011 at 9:47 AM, Tim <koop...@gmail.com> wrote:
>> Can someone please tell me the best way to store site settings in a Tapestry
>> application?
>>
>> I would like to store the location of a certain directory (where Lucene data
>> is to be kept), and it is different in development and in production, so I
>> don't want it hard coded into the code.  Where should I store this setting?
>>  In a properties file? (and if so, where do I store the location to the
>> properties files?)   In the web.xml file as a context-param?  In
>> app.properties?
>>
>> What do people out there do?
>>
>> I suspect the answer is probably app.properties, so how do I get access to
>> this in a normal Java class?
>>
>> Thanks.
>>
>> --
>> Tim Koop
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to