You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Glenn Rush <gl...@tias.com.au> on 2005/01/18 01:05:56 UTC

How to access context initparam in sitemap.xmap

----------------------------------------------------
| 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