Ard Schrijvers wrote: >> The context returned by cocoon.context is not the Avalon context it's >> the environment context which is mapped to the servlet context. > > So cocoon.context.getAttribute(org.apache.cocoon.Constants.CONTEXT_WORK_DIR) > works or does not work according the above? > I thought it just should work the way I mailed it [cocoon.context.getAttribute(Constants.CONTEXT_WORK_DIR)] > (though the org.apache.cocoon i meant implicitely because you might have equally well imported the class and use Constants.CONTEXT_WORK_DIR) > Sorry for my brief answer: it does not work. The constants defined in the Constants class starting with CONTEXT all refer to the Avalon component context. cocoon.context is the o.a.c.environment.Context class; it has no pre defined attributes, but as it is mapped to the servlet context, it has all attributes from the servlet context.
To add more confusion, there is a constant in the Constants class which points to the o.a.c.environment.Context object in the Avalon context (something like CONTEXT_ENVIRONMENT_CONTEXT). Now, this is all a little bit..ehm...messy, but it's the way it has been defined years ago. Carsten -- Carsten Ziegeler http://www.osoco.org/weblogs/rael/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]