Re: 'Parametrizing' context.xml?

2011-04-15 Thread pzwedhhs
Ok, adding a line in catalina.properties seems to set the value at least. It appears, when I call System.getProperties() inside the Java code. However, I still could not find out, how to access the variable in context.xml. Laicreparc_ wrote: Ok, I have added the line DBVAL=mydb_dev to

RE: 'Parametrizing' context.xml?

2011-04-15 Thread Caldarale, Charles R
From: pzwedhhs [mailto:pzwed...@guerrillamailblock.com] Subject: Re: 'Parametrizing' context.xml? I still could not find out, how to access the variable in context.xml. Are you sure that the context.xml you're modifying is the one being used? If there's a Context element in conf/Catalina

Re: 'Parametrizing' context.xml?

2011-04-14 Thread Laicreparc_
Ok, I have added the line DBVAL=mydb_dev to catalina.properties. Now I define a Realm in my webabb's context.xml: Realm className=org.apache.catalina.realm.JDBCRealm driverName=org.postgresql.Driver connectionURL=jdbc:postgresql://myserver:5432/${DBVAL}

Re: 'Parametrizing' context.xml?

2011-04-13 Thread Laicreparc
How can the variable (i.e. here BPVAL be set)? E.g. in server.xml? Is context-param really in context.xml? Looks more like web.xml to me. Bill Barker wrote: Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b27994e.5080...@megafon.hr... Bill Barker wrote: Mario Splivalo

Re: 'Parametrizing' context.xml?

2011-04-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Laicreparc, On 4/13/2011 11:38 AM, Laicreparc wrote: How can the variable (i.e. here BPVAL be set)? E.g. in server.xml? Did you read the post? It says how to set those values. Is context-param really in context.xml? Looks more like web.xml to

Re: 'Parametrizing' context.xml?

2009-12-17 Thread Mario Splivalo
Bill Barker wrote: Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b27994e.5080...@megafon.hr... Bill Barker wrote: Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b266622.5060...@megafon.hr... Tomcat also supports ant-style variable replacement, so using

Re: 'Parametrizing' context.xml?

2009-12-16 Thread Mario Splivalo
Pid wrote: On 14/12/2009 16:21, Mario Splivalo wrote: Is there a way to 'parametrize' context.xml, for instance, in a manner one can 'parametrize' build.xml? For some webapplication in context.xml one puts, for instance, JDBC specific stuff. But, several developers can have different

Re: 'Parametrizing' context.xml?

2009-12-15 Thread Mario Splivalo
Bill Barker wrote: Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b266622.5060...@megafon.hr... Tomcat also supports ant-style variable replacement, so using that then Ken's example would look like: context-param param-namebaseprefix/param-name

Re: 'Parametrizing' context.xml?

2009-12-15 Thread Pid
On 14/12/2009 16:21, Mario Splivalo wrote: Is there a way to 'parametrize' context.xml, for instance, in a manner one can 'parametrize' build.xml? For some webapplication in context.xml one puts, for instance, JDBC specific stuff. But, several developers can have different 'properties' for the

Re: 'Parametrizing' context.xml?

2009-12-15 Thread Bill Barker
Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b27994e.5080...@megafon.hr... Bill Barker wrote: Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b266622.5060...@megafon.hr... Tomcat also supports ant-style variable replacement, so using that then Ken's

'Parametrizing' context.xml?

2009-12-14 Thread Mario Splivalo
Is there a way to 'parametrize' context.xml, for instance, in a manner one can 'parametrize' build.xml? For some webapplication in context.xml one puts, for instance, JDBC specific stuff. But, several developers can have different 'properties' for the database (different user accounts, and so

Re: 'Parametrizing' context.xml?

2009-12-14 Thread Ken Bowen
You can make use of ant's token filtering on copy. You identify the parameters in your context.xml, and create a separate new context.xml with those parameters identified. For example, we have several such parameters occurring in our web.xml, such as @BPVAL@ below: context-param

Re: 'Parametrizing' context.xml?

2009-12-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ken, On 12/14/2009 11:50 AM, Ken Bowen wrote: You can make use of ant's token filtering on copy. This is exactly what we do to solve the OP's problem: we have a revision-controlled context.xml file that has all this replacement stuff in it. Running

Re: 'Parametrizing' context.xml?

2009-12-14 Thread Bill Barker
Mario Splivalo mario.spliv...@megafon.hr wrote in message news:4b266622.5060...@megafon.hr... Is there a way to 'parametrize' context.xml, for instance, in a manner one can 'parametrize' build.xml? For some webapplication in context.xml one puts, for instance, JDBC specific stuff. But,