How to pass System Properties in web.xml
By:Roy.LiuLast updated:2019-08-17
In Java standalone application, you can use -D option to pass in the system properties :
$ java -Dgeoip.file="/home/mkyong/geoip/test.db" test.jar
In Java web application, you can pass the system properties via context-param in web.xml :
web.xml
<web-app> <context-param> <param-name>geoip.file</param-name> <param-value>/home/mkyong/geoip/test.db</param-value> </context-param> </web-app>
From:一号门
COMMENTS