Just wanted to give a big Thank you Ulrich for your wiki entry. It was
extremely helpful for me and just the thing I needed.
Thanks again, David
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-loading-tapestry-configuration-from-properties-file-tp2426845p5481846.html
I had some problems with deploying my project and reading properties with
this example (developed on Jetty - OK!, but deployed on Tomcat, and reading
properties failed).
Solution was in Tapestry source code:
InputStream in =
!
- Original Message -
From: Ulrich Stärk [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, 18 September, 2008 11:44:30 AM GMT +02:00 Athens, Beirut,
Bucharest, Istanbul
Subject: Re: [T5] loading tapestry configuration from properties file?
I wrote
thanks for sharing!
- Original Message -
From: Ulrich Stärk [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, 18 September, 2008 11:44:30 AM GMT +02:00 Athens, Beirut,
Bucharest, Istanbul
Subject: Re: [T5] loading tapestry configuration from properties file
Ulrich Stärk wrote:
Russell Brown schrieb:
What 'it'? You mean symbol names?
Well the 'it' was the class, or moreover the approach but that does
result in specifically the
symbol names in this instance, so: Yes that it, or they.
Indeed. I think I could just load everything into a Map,
I also revisited my code now. :-P
Changes:
* if not logger is supplied, it wraps all errors as
IllegalArgumentException (fail-fast, as requested by Russell)
* supports loading properties from existing Propeties/Dictionary object
* extends MapSymbolProvider - so it delegates all case
Neeme Praks schrieb:
Ulrich Stärk wrote:
Russell Brown schrieb:
What 'it'? You mean symbol names?
Well the 'it' was the class, or moreover the approach but that does
result in specifically the
symbol names in this instance, so: Yes that it, or they.
Indeed. I think I could just load
On Thu, Sep 18, 2008 at 9:46 AM, Neeme Praks [EMAIL PROTECTED] wrote:
Is it possible to tell to Tapestry: please load all properties from
WEB-INF/myapp.properties?
If not, can someone give some pointers on how to implement it?
(it would also be a welcome out-of-the-box addition to Tapestry5)
You can write a Property File based symbol provider implementation (or that is
what I did). Mine just takes an array of strings (which are properties files on
the class path) and loads them into a map. Then your imp los
SymbolProvider.valueForSymbol(String) is just yourSymbolMap.get(String). To
I wrote a SymbolProvider that reads a properties file either from classpath or a filesystem
location. I'm going to write a wiki howto about it today.
Uli
Neeme Praks schrieb:
Hi,
I know Tapestry5 really pushes the convention-over-configuration
approach, but lets face it - in every
Thats great thanks for sharing!
- Original Message -
From: Ulrich Stärk [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, 18 September, 2008 11:44:30 AM GMT +02:00 Athens, Beirut,
Bucharest, Istanbul
Subject: Re: [T5] loading tapestry configuration from
September, 2008 11:44:30 AM GMT +02:00 Athens, Beirut,
Bucharest, Istanbul
Subject: Re: [T5] loading tapestry configuration from properties file?
I wrote a SymbolProvider that reads a properties file either from classpath or a filesystem
location. I'm going to write a wiki howto about it today
Message -
From: Ulrich Stärk [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Thursday, 18 September, 2008 11:44:30 AM GMT +02:00 Athens, Beirut,
Bucharest, Istanbul
Subject: Re: [T5] loading tapestry configuration from properties file?
I wrote a SymbolProvider
Nice, thanks for that one.
I would suggest to add that PropertiesFileSymbolProvider class also to
main Tapestry5 distribution. And I took the liberty to refactor the
symbol provider implementation in wiki to be more generic: it now
accepts also URL and InputStream as possible places to load
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Neeme Praks
Sent: 18 September 2008 14:08
To: users@tapestry.apache.org
Subject: Re: [T5] loading tapestry configuration from properties file?
Nice, thanks for that one.
I would suggest to add that PropertiesFileSymbolProvider
Russell Brown schrieb:
I still think you need to T5-alize it and make it case insensitive.
What 'it'? You mean symbol names?
And why oh why oh why bury your exceptions and just log them? Why not let them
bubble up so that
they are thrown? Otherwise you will just get a symbol exception
Message-
From: Ulrich Stärk [mailto:[EMAIL PROTECTED]
Sent: 18 September 2008 16:15
To: Tapestry users
Subject: Re: [T5] loading tapestry configuration from properties file?
Russell Brown schrieb:
I still think you need to T5-alize it and make it case insensitive.
What 'it'? You mean symbol
Neeme Praks schrieb:
PS. Sorry about the curly braces style in the refactored class - my
eclipse autoformatted it to my coding style and I was too lazy to change
it back
Please don't be too lazy next time... I revised it a bit because I personally don't like to have
several initialization
Russell Brown schrieb:
What 'it'? You mean symbol names?
Well the 'it' was the class, or moreover the approach but that does result in
specifically the
symbol names in this instance, so: Yes that it, or they.
Indeed. I think I could just load everything into a Map, thereby making it all
Russell Brown schrieb:
What 'it'? You mean symbol names?
Well the 'it' was the class, or moreover the approach but that does result in
specifically the
symbol names in this instance, so: Yes that it, or they.
My PropertiesFileSymbolProvider now makes use of a CaseInsensitiveMap and on
20 matches
Mail list logo