cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Norman <>
Subject Re: PropertiesFileModule
Date Wed, 28 Sep 2005 10:36:40 GMT
Thanks for the quick response.  I tried using 
"context:/" in cocoon.xconf and that works for loading 
the file directly from WEB-INF.

However, cocoon:/ doesn't work.  I have a matcher in my sitemap that 
matches on (I can load it from the browser using the 
appropriate URL ok) but it doesn't want to work in the xconf.  I'm 
gussing this is because the sitemap isn't properly loaded when cocoon 
reaches that part in it's initialisation.  The problem is that I need to 
change config files depending on what host the user is loading the page 
from so I need to use the matcher.


> Hi,
> cocoon:/ represents the url part that matches your sitemap. cocoon:// 
> represents the root url for cocoon. note that when using cocoon: you 
> need to have a match pattern that catches you request. In your case, 
> you need a match for "".
> Alternatively, you could use context:/ (or was it context://?) which 
> refers to the webapp _directory_ of cocoon.
> Refrain from using file: protocol when accessing files from within the 
> webapp or web-inf. When you deploy the web application as a war and it 
> is _not_ extracted but read directly by the application server, this 
> results in file not found errors... :-P
> HTH,
> Geert
> Rob Norman wrote:
>> Hi,
>> I'm having problems with the PropertiesFileModule in Cocoon 2.1.7 
>> under Tomcat 5.0.  I'm trying to load a simple properties file from a 
>> cocoon matcher (the URI in the cocoon.xconf is 
>> cocoon:/ I figured that since it uses a 
>> SourceResolver and the examples use resource:/, it should work.  
>> However, it keeps saying "Cannot load properties file".
>> I then changed it to not have the cocoon:/ on the front so it was 
>> simply specifying a file and that doesn't work either.  I have the 
>> appropriate file in the root of my webapp and in the WEB-INF 
>> directory and it still can't find the file.
>> Can someone tell me where the file needs to be (or even better, how 
>> to specify that it's in the WEB-INF directory) please?
>> Cheers,
>>    Rob.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message