Each sitemap component (generator, transformer etc) gets within
the setup() method the SourceResolver. This object is used
for resolving resources. One task if the SourceResolver is to
map relative definitions to absolute ones.
So if you call resolve("resources") on the SourceResolver
you get a Source object which points to the resources
directory within your cocoon webapp directory.

You can now either choose the getFile() method of the Source
object to get a File object or the getSystemId() to get
a URL string ("file:/..../cocoon/resources")

Carsten

> -----Ursprüngliche Nachricht-----
> Von: David Crossley [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 17. August 2001 06:49
> An: [EMAIL PROTECTED]
> Betreff: how to determine runtime location of resources directory
>
>
> I have one coding issue that is holding up our
> Cocoon development work. Help please.
>
> What is the Java code to determine the full pathname
> to the runtime location of the resources directory:
>  webapps/cocoon/resources/
>
> Surely there would be an easy way to do this, but
> even after tearing out my remaining hair, i cannot
> figure it out. Please provide a snippet or point to
> a code example.
>
> thanks, David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


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

Reply via email to