cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conny Krappatsch <>
Subject [C2]Getting absolute path of component parameter [was: Proposal: URL Protocols]
Date Tue, 30 Jan 2001 16:59:41 GMT
Would the proposed solve the problem I'm currently having?

I wrote a Component which provides access to a CMS. The CMS needs to be
initalized with a  file name. Configuration in cocoon.xconf currently
looks like this:

<component role="org.infozone.prowler.Prowler"  
    <parameter name="properties"

This works as long as the location of the properties file isn't changed. A
possibility to use a path relative to the web application would be great.
I spent some time digging through Cocoon sources to find a solution, but
without success (at least I learned a lot about C2 architecture and Avalon

Is there a solution for my problem (can I access the context object from
the components configure method)?
If not, would the proposal below be the solution? (sounds like that) Then
I vote +1000 for it ;-).

thanks for any help,
Conny Krappatsch

On Tue, 30 Jan 2001 10:53:59 -0500
Berin Loritsch <> wrote:
> I want to run something by the list regarding the way
> Cocoon uses URLs to get references to files and such.
> This _does_ affect both versions, and it refers to the
> naming of the protocols.  The way Servlet 2.2+ specifies
> to get files from the WAR file is the context.getResource()
> method.  All resources are relative to the context root.
> This is separate and distinct from Classloader Resources.
> My proposal is to specify the following Resource protocols:
> "resource:" This gets a ClassLoader resource, loaded by
>             the Cocoon ClassLoader.  This is what it already
>             does.
> "context:"  This gets a Context resource, pulled by the
>             Context.getResource() method.
> The reason for this proposal is because it will make a Cocoon
> based WAR file more portable.  If someone wants to package
> their Logicsheets inside their WAR file, they can always
> reference them by "context:/Relative/path/to/resource.xsl"
> and won't have to rewrite the and cocoon.xconf
> files for each installation.
> In fact, the Producers/Generators should use the "context:"
> methodology to find the files for input into the system.
> That will ensure that they follow the security and architecture
> mechanisms of the Servlet specification.
> The only section that would require any file:// urls is the
> XSP architecture.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

Conny Krappatsch                    
SMB GmbH                              

View raw message