No. I wanted to go with plain wicket. However, is it recommended by the wicket team to use Spring? It is possible for me, but want to keep my project as small as possible.
On Sat, Jan 29, 2011 at 5:23 PM, James Carman <ja...@carmanconsulting.com> wrote: > Are you using Spring? > > On Sat, Jan 29, 2011 at 11:17 AM, Christian Grobmeier > <grobme...@gmail.com> wrote: >> Hello >> >> I tried to figure out how one can load own configuration files into >> wicket, for example with configuration on smtp host or something like >> that. >> >> It seems there is no standard way- is this correct? My solution is >> below, but it feels rather overcomplicated to me. >> I have overridden the init method and used the PropertiesFactory to >> load my own properties file into a member variable of my application >> class. I want my properties be available as long as the application >> lives (application scope) and accessible from various components. >> >> If you know any ways to make this easier, please let me know. >> >> Thanks >> Christian >> >> >> >> In my WebApplication class: >> >> @Override >> public void init() { >> ... >> PropertiesFactory properties = new PropertiesFactory(this); >> String configFile = "WEB-INF/config-deployment."; >> >> if(RuntimeConfigurationType.DEVELOPMENT.equals(this.getConfigurationType())) >> { >> configFile = "WEB-INF/config-development."; >> } >> Properties p = properties.load(TimeAndBillApplication.class, >> configFile); >> if(p != null) { >> applicationProperties = new >> Properties("applicationProperties", p.getAll()); >> } >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- http://www.grobmeier.de --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org