Environment/system variables in server.xml
问题 How can I use environment/system variables in tomcat server.xml, context.xml, etc configuration files? I tried to use ${ENV_VAR_NAME} (both for environment and system variable), ${env.ENV_VAR_NAME} (for environment variables). And nothing seems to work. 回答1: How it's realized in my box. Bash-script for startup: #!/bin/sh SMEMORY=1G XMEMORY=1G if [ $ENV == DEV ]; then port_shutdown="8005" port_http="8080" port_https="8443" elif [ $ENV == SIT ]; then port_shutdown="8006" port_http="8081" port