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:[EMAIL PROTECTED]
Sent: Wednesday, September 24, 2003 1:08 PM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to