Olivier GUCKERT wrote:
Hello all !Java doesn't know about environment variables !
The home of my webapp will soon move, and i want to declare it with an
environment variable.
So i define an environment variable and replace the path to the
directory of my website sitemap.xmap with this variable :
so : before :
<map:match pattern="referentiels/**">
<map:mount uri-prefix="referentiels"
src="file:/users/sys/guckert/dossiers/cocoon/referentiels/sitemap.xmap"
reload-method="synchron"
check-reload="yes"/>
</map:match>
and after : <map:match pattern="referentiels/**">
<map:mount uri-prefix="referentiels" src="file:$REFERENTIEL_HOME/sitemap.xmap"
reload-method="synchron"
check-reload="yes"/>
</map:match>
But, when i try to reload the index.html with Cocoon, i get the folowing
: Failed to load sitemap from file:$REFERENTIEL_HOME/sitemap.xmap
Is it not possible to do this with cocoon or what did i wrong ?
The best way to achieve this is the use of the "defaults" InputModule that will (should) come tomorrow in Cocoon 2.0.4 (or use the latest CVS).
The values for this module are set in cocoon.xconf. Adding there a
<referentiel-home>file:/the/referentiel/location</referentiel-home>
will allow you to write
<map:mount src="{defaults:referentiel-home}/sitemap.xmap" uri=.../>
Hope this helps,
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>