>>>>> "Carsten" == Carsten Ziegeler <[EMAIL PROTECTED]> writes:
Carsten> Colin Paul Adams wrote:
>> 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?
Carsten> Ok, then you can lookup the SourceResolver in your
Carsten> SourceFactory, pass the resolver to your Source object,
Carsten> resolve your path in the Source object and get the
Carsten> absolute path from Source object.
I'm having problems with this approach.
I am getting:
Initialization Problem
Message: Could not find component (key [org.apache.excalibur.source.SourceResolver])
(Key='org.apache.excalibur.source.SourceResolver')
Description: org.apache.avalon.framework.service.ServiceException: Could not find
component (key [org.apache.excalibur.source.SourceResolver])
(Key='org.apache.excalibur.source.SourceResolver')
Sender: org.apache.cocoon.servlet.CocoonServlet
Source: Cocoon Servlet
cause
org.apache.avalon.framework.context.ContextException: Unable to locate object-model
(No environment available)
as soon as I attempt to access any cocoon uri.
I tried instead to pass the service manager to the Source, so it could
fetch the source resolver, and then release it, but this makes no
difference.
I added an implementation for Servicable to my SourceFactory, in order
to get the ServiceManager (so as to get the SourceResolver). Is there
anything else I need to do?
--
Colin Paul Adams
Preston Lancashire