cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn Rush" <glenn.r...@tias.com.au>
Subject How to access context initparam in sitemap.xmap
Date Tue, 18 Jan 2005 00:05:56 GMT
----------------------------------------------------
| How to access context init param in sitemap.xmap |
----------------------------------------------------

I am having trouble accessing a context initialization parameter in
cocoon's sitemap.xmap.
The initialization parameter has been set in a web.xml
I cannot find any examples on how to do this the documentation or on the
web.

I realise I can access the parameter in a flow script using 
      cocoon.context.getInitParameter("testname"));
but is there an equivalent I can use in the sitemap.xmap?
Any advice appreciated.

Below are the relevant file snippets.

Web.xml

	...
    <init-param>
       <param-name>testname</param-name>
       <param-value>testvalue</param-value>
     </init-param>
	...


sitemap.xmap

	...
    <map:match pattern="**styles/*.css">
      <map:read mime-type="text/css" src="{1}/styles/{context-param:
testname}.css"/>
    </map:match>
	...

thanks

Glenn

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message