Referencing environment variable in xml
Referencing environment variable in xml
(OP)
I am on linux machine. My Application is using a xml file. In this xml file, a absolute File System path is mentioned. like., <ENTITY webapp_root "/usr/red/apache-tomcat/webapps/ROOT">
and this entity is referenced in many other properties in the same xml file. like.,
<PROPERTY NAME="DOCS">&webapp_root;/docs</PROPERTY>.
Now, webapp_root path is very much explicit and I want to be referenced from some place. I wondered this can be done by creating the env variable for webapp_root & refer it inside the xml.
I dont know how to do that... Can someone please help me on this ? I am badly in need to get this done !!
Thanks in advance.
and this entity is referenced in many other properties in the same xml file. like.,
<PROPERTY NAME="DOCS">&webapp_root;/docs</PROPERTY>.
Now, webapp_root path is very much explicit and I want to be referenced from some place. I wondered this can be done by creating the env variable for webapp_root & refer it inside the xml.
I dont know how to do that... Can someone please help me on this ? I am badly in need to get this done !!
Thanks in advance.
RE: Referencing environment variable in xml
The XML itself doesn't care whether you write
<PROPERTY NAME="DOCS">/usr/red/apache-tomcat/webapps/ROOT/docs</PROPERTY>
<PROPERTY NAME="DOCS">&webapp_root;/docs</PROPERTY>
<PROPERTY NAME="DOCS">$ROOT/docs</PROPERTY>
It's all down to how your specific application deals with the data as it is being processed.
--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.