cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathias Reem <m.r...@gmx.net>
Subject sitemap and application configuration
Date Thu, 05 Mar 2009 22:02:48 GMT
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


Mime
View raw message