Thanks a lot, Cemal. As always, you gave me a quick and brilliant answer.
I tried your first solution, and it works as a charm.

However, i wonder if there is a way to overload this properties file
according to the deployment environment (typically, i will have a file named
MyApplication.properties, another MyApplication.test.properties, and a 3rd
MyApplication.prod.properties) ?
Landry
2008/11/20 jWeekend <[EMAIL PROTECTED]>

>
> Landry,
>
> If your properties are application wide, create MyApplication.properties
> (assuming you called your WebApplication subclass MyApplication) in the
> same
> package as your MyApplication class and use getString if you have a
> Component (or subclass, like a Page) to talk to, otherwise use
> Applicaion.get().getResourceSettings().getLocalizer().getString ...
>
> Regards - Cemal
> http://www.jWeekend.co.uk <http://www.jweekend.co.uk/>
> http://jWeekend.co.uk <http://jweekend.co.uk/>
>
>
> landry soules wrote:
> >
> > Hello, i have a question about properties files :
> > I want to access several variables residing in a property file, from
> > various components of my application. What is the best way to achieve
> > this trivial need ?
> > Do you guys use Commons Configuration, or another api ? How do you
> > configure it to work with Wicket ?
> > Is there an example somewhere ?
> > I know my question sounds dumb, but in my previous job we used an home
> > made api to achieve this...
> > Thanks in advance !
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Properties-file-tp20610610p20611147.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to