cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamal Bhatt <kbh...@tt.com.au>
Subject [2.2] Accessing files relative to flowscript and logging
Date Thu, 24 Apr 2008 02:21:07 GMT
Hi,
I have a flowscript file that sits outside of a block (yes, I know, this 
is bad form). When I do a relative path to get a file, like so:

    cocoon.log.error(new 
Packages.java.io.File("../xml/hibernate.cfg.xml").getAbsolutePath())

I get a location that is not relative to the Flow file. Instead, it is 
relative to a directory in the application server. Is there any way to 
find the path of the flow file and/or set the path relative to the flow 
location?

Also, I noticed that log4j file has this:

    <appender name="COCOON_DEFAULT" class="org.apache.log4j.FileAppender">
        <param name="File"   
value="${org.apache.cocoon.work.directory}/cocoon-logs/log4j.log" />
        <param name="Append" value="false" />      
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
        </layout>    
    </appender>

Where is the ${org.apache.cocoon.work.directory}variable set and how can 
I inject my own variables into this file or others? Is this via the 
RCL.properties files?

Thanks.

-- 
Kamal Bhatt


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message