开发者

How can I pass java system property to jetty?

How can I pass a system property to jetty startup something like -DSERVER="localhost" if it is in start.config what is the exact syntax ? and will it be available to my deployed war wi开发者_如何学Cth this System.getProperty("SERVER") ?

thnx in advance


Have you tried to put something like this in start.ini?

--exec
-DSERVER="localhost"

(perhaps before OPTIONS=, but I'm not sure that's necessary.)

The comments in start.ini say:

If the arguements in this file include JVM arguments (eg -Xmx512m) or JVM System properties (eg com.sun.???), then these will not take affect unless the --exec parameter is included [...]


Edit the /etc/jetty/start.config and add SERVER="127.0.0.1" in the start if the file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜