开发者

Passing system properties to tomcat managed webapp when started by another process

The startUp script of webapp is going to be executed by a standalone java management process. I understand that -D system properties can开发者_StackOverflow中文版 be set to CATALINA_OPTS in catalina.sh. So is the only way to pass system properties is for the java management process to go write into catalina.sh? I


I think this should be possible, but dont have the exact answer.

If it can be passed in an ant task like shown on this link, I assume it should be able to call the

org.apache.catalina.startup.Bootstrap load() passing in JVM args

<target name="tomcat-start">
    <java jar="${tomcat.home}/bin/bootstrap.jar" fork="true">
        <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
    </java>
</target>

<target name="tomcat-stop">
    <java jar="${tomcat.home}/bin/bootstrap.jar" fork="true">
        <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
        <arg line="stop"/>
    </java>
</target>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜