I would like to know if there is possibility to set an attribute in web.xml
by using property file. For example the web.xml:
<context-param>
<param-name>Map.MyJNDI</param-name>
<param-value>java:comp/env/jdbc/${my.computer}</param-value>
</context-param>
and application.properties
would be:
# My computer's name
my.computer=eniac
You can't have values substituted in web.xml like that.
One option I can suggest if possible just have a template web.xml with place holder for values and during build for each environment have a step in build process that will substitute required values from required properties file of that environment.
you can not set value from
Properties
file but you can set the property file and read its at runtime.then read the property file at runtime.
hope this help other too.