fix a trivial bug in the initialization of the jetty server.

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1197 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Hugues Malphettes 2010-01-14 06:17:36 +00:00
parent 8b59dcf1bf
commit efdff3ecfe
1 changed files with 10 additions and 3 deletions

View File

@ -275,9 +275,9 @@ class WebappRegistrationHelper
String jettyetc = System.getProperty(OSGiWebappConstants.SYS_PROP_JETTY_ETC_FILES,"etc/jetty.xml");
StringTokenizer tokenizer = new StringTokenizer(jettyetc,";,");
Map<Object,Object> id_map = new HashMap();
id_map.put("Server","_server");
Map<Object,Object> properties = new HashMap();
Map<Object,Object> id_map = new HashMap<Object,Object>();
id_map.put("Server",_server);
Map<Object,Object> properties = new HashMap<Object,Object>();
properties.put("jetty.home",jettyHome);
properties.put("jetty.host",System.getProperty("jetty.host",""));
properties.put("jetty.port",System.getProperty("jetty.port","8080"));
@ -382,6 +382,13 @@ class WebappRegistrationHelper
break;
}
}
if (_provider == null) {
//why not creating it on the fly?
//I think it is nice to create it on the fly:
//this way we can reuse the original jetty.xml
_provider = new OSGiAppProvider();
_deploymentManager.addAppProvider(_provider);
}
}
if (_ctxtHandler == null || _provider==null)