You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2004/07/22 08:19:11 UTC

Path to sitemap mounted from mount table

>>>>> "Jean-Claude" == Jean-Claude Moissinac <mo...@enst.fr> writes:

    Jean-Claude> I'm searching from more than two hours for a mean to
    Jean-Claude> know the absolute path to the current sitemap in my
    Jean-Claude> action code.  If I use ...  Context context =
    Jean-Claude> ObjectModelHelper.getContext(objectModel); ...  path
    Jean-Claude> = context.getRealPath("/samples/CocoonMp4");

    Jean-Claude> my action works, but the code is only usable in my
    Jean-Claude> current installation.

Hello Jean-Claude.

I have this problem too.
I was trying to use request.getSitemapPath(). (Only available in CVS -
not in 2.1.5)
 
But this only returns a part of the answer.
When I saw your message above, I tried to combine the two:

context.getRealPath(request.getSitemapPath());

This may well work for you. I hope it does.

Unfortunately, it does not work for me, because I am using the mount
table.

The answer I get from my suggestion is:

/home/colin/cocoon-2.1/build/webapp/onevoice/members

whereas the actual answer I want is

/home/colin/onevoice/members

as that is where my sitemap.xmap is.

So can anyone tell me how to get the path to a sitemap mounted from
the mount table?
-- 
Colin Paul Adams
Preston Lancashire