cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Horsfield, Peter A." <peter.horsfi...@ngc.com>
Subject RE: Real Path to Sitemap directory in a WebApp
Date Wed, 24 Sep 2003 17:52:35 GMT
Hi Chris,

In your generator, there is a setup method that gets called with 
the cocoon object model.

do this:

import org.apache.cocoon.environment.ObjectModelHelper;

then in the setup method:

ObjectModelHelper.getContext(objectModel).getRealPath();


I don't have Cocoon installed on this machine, but I
think this is what I did.

Regards,

Peter


Peter Horsfield

-----Original Message-----
From: Chris Wilder-Smith [mailto:cws@cast.org]
Sent: Wednesday, September 24, 2003 1:08 PM
To: users@cocoon.apache.org
Subject: Real Path to Sitemap directory in a WebApp


Hi,

We're building a cocoon-based system that has a hierarchical structure
with sub-sitemaps.  It also uses a custom generator.  We open files in
the file system from this generator.  I'd like to have access to the
real path to the directory that the sitemap is in so that different
instances of the generator can load the correct files from their
directories.  Preferably the instance won't know anything about the
structure above it.  

So, it seems that there must be a way to determine the real path to the
directory that holds this particular sub-sitemap, but I haven't been
able to find any references.  Any pointers?

Thanks,

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message