Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333771

Summary: System properties are not available inside XML configuration file by using the 'property' tag.
Product: [RT] Jetty Reporter: valentino miazzo <valentino>
Component: serverAssignee: Joakim Erdfelt <joakim.erdfelt>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: gregw, jetty-inbox, valentino
Version: 7.2.1   
Target Milestone: 7.1.x   
Hardware: PC   
OS: Linux   
Whiteboard:

Description valentino miazzo CLA 2011-01-07 12:31:31 EST
Build Identifier: jetty-distribution-7.2.2.v20101205.tar.gz

In etc/jetty.xml the jetty.port property is accessed via <Property name="jetty.port" default="8080"/>.
Similarly in etc/jetty-logging.xml the jetty.logs property is accessed via <Property name="jetty.logs" default="./logs"/>.
The bin/jetty.sh reads JETTY_PORT and JETTY_LOGS env. vars and passes them via -Djetty.port=... -Djetty.logs=... as JVM parameters (not Jetty parameters).
It worked fine on Jetty 7.1.4.
After switching to 7.2.2 we found this is not more the case. 
The property tag returns null.

Note, the SystemProperty tag returns them correctly.
Note, the property tag returns them correctly if passed as Jetty parameters.

I worked around the issue by repeating the property pairs as Jetty params.
I.E. java -Djetty.port=8888 -jar start.jar jetty.port=8888

If this is a regression bug then is should be fixed.
If this a wanted behavior then it should be document and scripts or config files fixed. As they are now, they fail silently.

Reproducible: Always

Steps to Reproduce:
1- Install Jetty 7.2.2
2- Change /etc/default/jetty 
   export JETTY_PORT=8888
3- Start jetty

Jetty is at the default port 8080 not at 8888
Comment 1 Greg Wilkins CLA 2011-01-10 11:46:05 EST
Joakim,

can you look at this one please and move these system properties to be jetty properties everywhere.

thanks
Comment 2 Joakim Erdfelt CLA 2011-01-10 19:37:36 EST
Fixed in /rt/org.eclipse.jetty/jetty/trunk@2646