You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mathias Reem <m....@gmx.net> on 2009/03/05 23:02:48 UTC
sitemap and application configuration
Hi
we are using commons-configuration to configure our application at
runtime. Therefore I registered a XMLConfiguration as an bean in
/WEB-INF/applicationContext.xml
...
<bean name="appConf"
class="org.apache.commons.configuration.XMLConfiguration"
scope="singleton">
<constructor-arg type="java.lang.String">
<value>app.cfg.xml</value>
</constructor-arg>
</bean>
...
After a little research I found out, that I can access my bean via:
wac = WebAppContextUtils.getCurrentWebApplicationContext();
configuration = (Configuration) wac.getBean("appConf");
My first questing would be, is this how I should request my beans or is
there another (prefered way) to retrieve beans?
Some of the configuration options have to be propagated into XSLTC. So I
would like to pass the options as parameters to XSLTC, but to do this, I
must access the configuration bean in the sitemap.
My second question is, whether there is a way to do it? Or which
approach should I use instead?
Any input is welcome.
Mathias
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org