How to access configuration files and properties after packaging

2008-07-03 Thread Johannes Hoechstaedter

Hi everybody,

in my cocoon block I have some configuration files in the 
resource/external directory, which I want to be accessible by the admin 
of the application even when I compiled the block, and put it as webapp 
into my Tomcat. Till now these files are packed correctly into the block 
jar but because of this they aren't really accessible for quick changes.


I have the same problem with my property file in META-INF/cocoon/properties.

All of this configuration files should be placed into 
webapps/webapp/WEB_INF/classes


Any solutions?

Thank you
Johannes


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to access configuration files and properties after packaging

2008-07-03 Thread Robin Rigby
Here is one way that seems to work.  Make a separate set of configuration
for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties 

and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the same would
work in Tomcat, ect.



But this has not solved all my problems.  I tried it with log4j.properties.
It works fine, provided the application is packaged in a .war file and run
from there.  But in that case, there is no rcl.

To have rcl, I run the block directly but then I don't know how to configure
log4j.  

I have the same problem with sdocbook - entity catalog resolution.  It works
from the war file, not from the block itself.

Is there an easy way to configure these?

Thanks

 
Robin
 

-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 11:06
To: users@cocoon.apache.org
Subject: How to access configuration files and properties after packaging

Hi everybody,

in my cocoon block I have some configuration files in the 
resource/external directory, which I want to be accessible by the admin 
of the application even when I compiled the block, and put it as webapp 
into my Tomcat. Till now these files are packed correctly into the block 
jar but because of this they aren't really accessible for quick changes.

I have the same problem with my property file in META-INF/cocoon/properties.

All of this configuration files should be placed into 
webapps/webapp/WEB_INF/classes

Any solutions?

Thank you
Johannes


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access configuration files and properties after packaging

2008-07-03 Thread Andy Stevens
2008/7/3 Robin Rigby [EMAIL PROTECTED]:
 Here is one way that seems to work.  Make a separate set of configuration
 for development and the default for production.

 \src\main\resources\META-INF\cocoon\properties\config.properties
 \src\main\resources\META-INF\cocoon\dev\properties\config.properties

 and run during development with

 mvn -Dorg.apache.cocoon.mode=dev jetty:run

Safer, surely, to make development the default and configure the
production server with the system property?  Otherwise a developer who
forgets the -D when testing out some code changes could completely
mess up your live data...


Andy.
-- 
http://pseudoq.sourceforge.net/  Open source java Sudoku application

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access configuration files and properties after packaging

2008-07-03 Thread Johannes Hoechstaedter


Robin Rigby schrieb:

Here is one way that seems to work.  Make a separate set of configuration
for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties 


and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the same would
work in Tomcat, ect


Thank you for your answer Robin, but your configuration files are still 
packaged in in the jar file, or? Thats what I want to pretend.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to access configuration files and properties after packaging

2008-07-03 Thread Robin Rigby
ok.  Depends what the config does.  In my case, there would be an ugly crash
before any damage could be done.

btw.  I think that should have been
 
\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\properties\dev\config.properties 

Robin
 

-Original Message-
From: Robin Rigby [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 12:23
To: users@cocoon.apache.org
Subject: RE: How to access configuration files and properties after
packaging

Here is one way that seems to work.  Make a separate set of configuration
for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties 

and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the same would
work in Tomcat, ect.



But this has not solved all my problems.  I tried it with log4j.properties.
It works fine, provided the application is packaged in a .war file and run
from there.  But in that case, there is no rcl.

To have rcl, I run the block directly but then I don't know how to configure
log4j.  

I have the same problem with sdocbook - entity catalog resolution.  It works
from the war file, not from the block itself.

Is there an easy way to configure these?

Thanks

 
Robin
 

-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 11:06
To: users@cocoon.apache.org
Subject: How to access configuration files and properties after packaging

Hi everybody,

in my cocoon block I have some configuration files in the 
resource/external directory, which I want to be accessible by the admin 
of the application even when I compiled the block, and put it as webapp 
into my Tomcat. Till now these files are packed correctly into the block 
jar but because of this they aren't really accessible for quick changes.

I have the same problem with my property file in META-INF/cocoon/properties.

All of this configuration files should be placed into 
webapps/webapp/WEB_INF/classes

Any solutions?

Thank you
Johannes


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to access configuration files and properties after packaging

2008-07-03 Thread Robin Rigby
Try a third set of resources, that are not packaged in the war file, in
addition to internal and external.  The path to them can be configured as I
described.  The sitemap does something like: 

map:pipeline id=non-war-resource
map:match pattern=resource/nonwar/**
map:read src={path.to.non.war.resources}/{1} /
etc
 
Robin
 

-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 12:45
To: users@cocoon.apache.org
Subject: Re: How to access configuration files and properties after
packaging


Robin Rigby schrieb:
 Here is one way that seems to work.  Make a separate set of configuration
 for development and the default for production.

 \src\main\resources\META-INF\cocoon\properties\config.properties
 \src\main\resources\META-INF\cocoon\dev\properties\config.properties 

 and run during development with

 mvn -Dorg.apache.cocoon.mode=dev jetty:run

 It is documented somewhere _if_ you can find it.  I suppose the same would
 work in Tomcat, ect

Thank you for your answer Robin, but your configuration files are still 
packaged in in the jar file, or? Thats what I want to pretend.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access configuration files and properties after packaging

2008-07-03 Thread Johannes Hoechstaedter
Your right. I don't want to configure important properties during 
runtime. My aim is an application which is easy configurable by the 
sysadmin without the need for compilation.
For example when the system is down some properties or some some 
resources (table decriptors for example) should be changeble, by the 
admin, who has no maven installed or the knowledge abaout zip and jar 
files, which are buried deep into the system.


Robin Rigby schrieb:

ok.  Depends what the config does.  In my case, there would be an ugly crash
before any damage could be done.

btw.  I think that should have been
 
\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\properties\dev\config.properties 


Robin
 


-Original Message-
From: Robin Rigby [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 12:23

To: users@cocoon.apache.org
Subject: RE: How to access configuration files and properties after
packaging

Here is one way that seems to work.  Make a separate set of configuration
for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties 


and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the same would
work in Tomcat, ect.



But this has not solved all my problems.  I tried it with log4j.properties.
It works fine, provided the application is packaged in a .war file and run
from there.  But in that case, there is no rcl.

To have rcl, I run the block directly but then I don't know how to configure
log4j.  


I have the same problem with sdocbook - entity catalog resolution.  It works
from the war file, not from the block itself.

Is there an easy way to configure these?

Thanks

 
Robin
 


-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 11:06

To: users@cocoon.apache.org
Subject: How to access configuration files and properties after packaging

Hi everybody,

in my cocoon block I have some configuration files in the 
resource/external directory, which I want to be accessible by the admin 
of the application even when I compiled the block, and put it as webapp 
into my Tomcat. Till now these files are packed correctly into the block 
jar but because of this they aren't really accessible for quick changes.


I have the same problem with my property file in META-INF/cocoon/properties.

All of this configuration files should be placed into 
webapps/webapp/WEB_INF/classes


Any solutions?

Thank you
Johannes


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access configuration files and properties after packaging

2008-07-03 Thread Johannes Hoechstaedter

How can I access the web-inf folder?

Robin Rigby schrieb:

Try a third set of resources, that are not packaged in the war file, in
addition to internal and external.  The path to them can be configured as I
described.  The sitemap does something like: 


map:pipeline id=non-war-resource
map:match pattern=resource/nonwar/**
map:read src={path.to.non.war.resources}/{1} /
etc
 
Robin
 


-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 12:45

To: users@cocoon.apache.org
Subject: Re: How to access configuration files and properties after
packaging


Robin Rigby schrieb:
  

Here is one way that seems to work.  Make a separate set of configuration
for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties 


and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the same would
work in Tomcat, ect



Thank you for your answer Robin, but your configuration files are still 
packaged in in the jar file, or? Thats what I want to pretend.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access configuration files and properties after packaging

2008-07-03 Thread Barbara Slupik
I use properties to define my database connection. I my development  
environment I add my properties into block rcl.properties and I can  
test blocks individually with jetty. rcl.properties file is not  
included in block jar file. In my application I created cocoon/ 
properties/application.properties file in src/main/webapp/WEB-INF.  
This file contains all properties from all application blocks. When  
my application runs in tomcat I have cocoon/properties/ 
application.properties in my WEB-INF and I can edit it without  
changing jar files.


Barbara

On 3 Jul, 2008, at 1:04 pm, Johannes Hoechstaedter wrote:


How can I access the web-inf folder?

Robin Rigby schrieb:
Try a third set of resources, that are not packaged in the war  
file, in
addition to internal and external.  The path to them can be  
configured as I

described.  The sitemap does something like:
map:pipeline id=non-war-resource
map:match pattern=resource/nonwar/**
map:read src={path.to.non.war.resources}/{1} /
etc
 Robin

-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED]  
Sent: 03 July 2008 12:45

To: users@cocoon.apache.org
Subject: Re: How to access configuration files and properties after
packaging


Robin Rigby schrieb:

Here is one way that seems to work.  Make a separate set of  
configuration

for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties
and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the  
same would

work in Tomcat, ect



Thank you for your answer Robin, but your configuration files are  
still packaged in in the jar file, or? Thats what I want to pretend.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to access configuration files and properties after packaging

2008-07-03 Thread Johannes Hoechstaedter

Hi,

that mechanism with the property file works. Thumbsup :) For a strange 
reason I have the porty file in my jar file and in the expected folder, 
although I have deleted it from my block.


My second question is still, how I can access some folders outside of my 
jar by the pointed out 


map:pipeline id=non-war-resource
   map:match pattern=resource/nonwar/**
   map:read src={path.to.non.war.resources}/{1} /

I got a little bit confused about the protocol. Whats context://, 
resource://, ... do I need this?


Barbara Slupik schrieb:
I use properties to define my database connection. I my development 
environment I add my properties into block rcl.properties and I can 
test blocks individually with jetty. rcl.properties file is not 
included in block jar file. In my application I created 
cocoon/properties/application.properties file in 
src/main/webapp/WEB-INF. This file contains all properties from all 
application blocks. When my application runs in tomcat I have 
cocoon/properties/application.properties in my WEB-INF and I can edit 
it without changing jar files.


Barbara

On 3 Jul, 2008, at 1:04 pm, Johannes Hoechstaedter wrote:


How can I access the web-inf folder?

Robin Rigby schrieb:

Try a third set of resources, that are not packaged in the war file, in
addition to internal and external.  The path to them can be 
configured as I

described.  The sitemap does something like:
map:pipeline id=non-war-resource
map:match pattern=resource/nonwar/**
map:read src={path.to.non.war.resources}/{1} /
etc
 Robin

-Original Message-
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 03 July 2008 12:45

To: users@cocoon.apache.org
Subject: Re: How to access configuration files and properties after
packaging


Robin Rigby schrieb:

Here is one way that seems to work.  Make a separate set of 
configuration

for development and the default for production.

\src\main\resources\META-INF\cocoon\properties\config.properties
\src\main\resources\META-INF\cocoon\dev\properties\config.properties
and run during development with

mvn -Dorg.apache.cocoon.mode=dev jetty:run

It is documented somewhere _if_ you can find it.  I suppose the 
same would

work in Tomcat, ect



Thank you for your answer Robin, but your configuration files are 
still packaged in in the jar file, or? Thats what I want to pretend.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]