cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Paul Adams <co...@colina.demon.co.uk>
Subject Re: current sitemap directory path
Date Thu, 22 Jul 2004 06:26:23 GMT
    >> -----Original Message----- From: Jean-Claude Moissinac
    >> Many samples which seams to use such an information are hard
    >> coded and become false if there are moved See, for exemple, the
    >> samples: /samples/modules/realpath.html
    >> /samples/sources/xsp/file ...  and how they works.
    >> 
    >> I think it is possible to get this information but finding
    >> howto is very difficult.  Is there a Cocoon gourou which can
    >> help me?


>>>>> "Carsten" == Carsten Ziegeler <cziegeler@s-und-n.de> writes:

    Carsten> You have to use the SourceResolver. Each sitemap
    Carsten> component (action, generator, transformer) gets this
    Carsten> object either in the act() method or in the setup()
    Carsten> method.  if you pass a relative path into the
    Carsten> SOurcerResolver it's resolved relative to the current
    Carsten> sitemap.

But this is only a solution when a Source object is what you want.
This is not the case for me. I need this information from WITHIN a
Source object, as I need to pass an absolute directory path to a
Berkeley DB XML API.

I tried using context.getRealPath ( request.getSitemapPath () ), but
this does not give the correct answer when the sitemap concerned is
mount from the mount table (and thus is not within the cocoon
build/webapp directory.
So how do I go about it?
-- 
Colin Paul Adams
Preston Lancashire

Mime
View raw message