Using properties in web.xml
问题 I would like to control the settings in web.xml and using different once for different environments. Is it possible to use a property, from a property file on classpath, in web.xml? Something like this: <context-param> <param-name>myparam</param-name> <param-value>classpath:mypropertyfile.properties['myproperty']</param-value> </context-param> Best regards P 回答1: No. However you can pass the properties file in and read from it at runtime. <context-param> <param-name>propfile</param-name>