How to pass properties to tomcat through command line
I need to pass -Dlog4j.d开发者_运维知识库ebug to tomcat through command line, how to do that ?? The platform in Linux box, the command is $CATALINA_HOME/bin/startup.sh
I've tried set CATALINA_OPTS=-Dlog4j.debug=true but noway !!
The solution is :
export CATALINA_OPTS=-Dlog4j.debug=true
I'm not sure how you're starting tomcat, but doing:
set CATALINA_OPTS=-Dlog4j.debug=true
And then starting it on the same command line, will do the job.
Hope this helps you
For permanent solution you can set it in $CATALINA_HOME/bin/setenv.sh
#!/bin/bash
CATALINA_OPTS="-Dlog4j.debug=true"
then run tomcat from any command-line $CATALINA_HOME/bin/startup.sh
精彩评论