cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: map:read options
Date Mon, 14 Jan 2008 16:54:06 GMT
Robin Wyles pisze:
> On 14 Jan 2008, at 15:40, Romain Slootmaekers wrote:
>> Robin Wyles wrote:
>> Yes the file:///C:/some path/installer.msi works
>> but I would like to have a relative path as the app needs to be
>> relocatable
> Relative paths are resolved relative to the location of the sitemap, and
> in C2.2 the location of the sitemap varies greatly depending on how you
> run cocoon during development, deployment etc. In your production webapp
> your sitemap will be in the jar file created for your block.
> You could use the directory generator [1] along with ../ in your src
> attribute to determine how the relative paths are resolved.
> I would suggest you try to determine the absolute path to your webapp
> context first and then resolve your path relative to that, you might
> want to take a look at using the ContextPathModule [2] which could help
> you.

Robin is right on his suggestion. In order obtain absolute location of your block you could
make use
of Input Module provided in COCOON-2145 but this demands patching Cocoon's sources.

Another way is to use properties as Romain already does. In sitemap one can obtain system
using settings module:


Since 2.2 incorporates Cocoon Spring Configurator sub-project it's very easy to work with
configuration options. See [2] for more details.


Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message