views:

42

answers:

2

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 with this System.getProperty("SERVER") ?

thnx in advance

A: 

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 [...]

Bruno
Thx Brunobut I do not have start.ini file any whereHint I use jetty 6 /Ubuntu 10.04
Montaro
Sorry, I was assuming Jetty 7.
Bruno
A: 

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

Montaro