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
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
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}
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
-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
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
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
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
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
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
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
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
-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
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,
14 matches
Mail list logo