Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Context.xml: how to reference parameter inside the same file

 
durbans oasoaksoak
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to create a context.xml where I have:



where parameter1, parameter2 and parameter3 use the values of the parameters tag defined previously.

Is it possible ?

I didn't find any way or syntax to set name1, name2 and name3 as reference .
It seems that it accepts only strings.
 
Hun Jinxijn
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a similar problem. Is it possible to do this? Is it even possible to define some value in server.xml or catalina.properties and use them in context.xml?

I have added the line



to catalina.properties.

Now I define a Realm in my webabb's context.xml:


However, in the logfiles I can find:
org.postgresql.util.PSQLException: FATAL: database "${DBVAL}" does not exist

It seems, that the parameter value was not replaced.

What I would like to have is to define a Realm once in context.xml, that will be used both on a development and on a productive server. The servers define the actual name of the database (here "mydb_dev"), e.g. in catalina.properties.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic