Merge branch 'jetty-9.1' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project into jetty-9.1
This commit is contained in:
commit
f7bde55038
|
@ -264,7 +264,22 @@ public class WebAppProvider extends ScanningAppProvider
|
||||||
|
|
||||||
if (resource.exists() && FileID.isXmlFile(file))
|
if (resource.exists() && FileID.isXmlFile(file))
|
||||||
{
|
{
|
||||||
XmlConfiguration xmlc = new XmlConfiguration(resource.getURL());
|
XmlConfiguration xmlc = new XmlConfiguration(resource.getURL())
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void initializeDefaults(Object context)
|
||||||
|
{
|
||||||
|
super.initializeDefaults(context);
|
||||||
|
|
||||||
|
if (context instanceof WebAppContext)
|
||||||
|
{
|
||||||
|
WebAppContext webapp = (WebAppContext)context;
|
||||||
|
webapp.setParentLoaderPriority(_parentLoaderPriority);
|
||||||
|
if (_defaultsDescriptor != null)
|
||||||
|
webapp.setDefaultsDescriptor(_defaultsDescriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
xmlc.getIdMap().put("Server",getDeploymentManager().getServer());
|
xmlc.getIdMap().put("Server",getDeploymentManager().getServer());
|
||||||
xmlc.getProperties().put("jetty.home",System.getProperty("jetty.home","."));
|
xmlc.getProperties().put("jetty.home",System.getProperty("jetty.home","."));
|
||||||
|
@ -297,8 +312,8 @@ public class WebAppProvider extends ScanningAppProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start building the webapplication
|
// Start building the webapplication
|
||||||
WebAppContext wah = new WebAppContext();
|
WebAppContext webAppContext = new WebAppContext();
|
||||||
wah.setDisplayName(context);
|
webAppContext.setDisplayName(context);
|
||||||
|
|
||||||
// special case of archive (or dir) named "root" is / context
|
// special case of archive (or dir) named "root" is / context
|
||||||
if (context.equalsIgnoreCase("root"))
|
if (context.equalsIgnoreCase("root"))
|
||||||
|
@ -309,7 +324,7 @@ public class WebAppProvider extends ScanningAppProvider
|
||||||
{
|
{
|
||||||
int dash=context.toLowerCase(Locale.ENGLISH).indexOf('-');
|
int dash=context.toLowerCase(Locale.ENGLISH).indexOf('-');
|
||||||
String virtual = context.substring(dash+1);
|
String virtual = context.substring(dash+1);
|
||||||
wah.setVirtualHosts(new String[]{virtual});
|
webAppContext.setVirtualHosts(new String[]{virtual});
|
||||||
context = URIUtil.SLASH;
|
context = URIUtil.SLASH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,17 +335,17 @@ public class WebAppProvider extends ScanningAppProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wah.setContextPath(context);
|
webAppContext.setContextPath(context);
|
||||||
wah.setWar(file.getAbsolutePath());
|
webAppContext.setWar(file.getAbsolutePath());
|
||||||
if (_defaultsDescriptor != null)
|
if (_defaultsDescriptor != null)
|
||||||
{
|
{
|
||||||
wah.setDefaultsDescriptor(_defaultsDescriptor);
|
webAppContext.setDefaultsDescriptor(_defaultsDescriptor);
|
||||||
}
|
}
|
||||||
wah.setExtractWAR(_extractWars);
|
webAppContext.setExtractWAR(_extractWars);
|
||||||
wah.setParentLoaderPriority(_parentLoaderPriority);
|
webAppContext.setParentLoaderPriority(_parentLoaderPriority);
|
||||||
if (_configurationClasses != null)
|
if (_configurationClasses != null)
|
||||||
{
|
{
|
||||||
wah.setConfigurationClasses(_configurationClasses);
|
webAppContext.setConfigurationClasses(_configurationClasses);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_tempDirectory != null)
|
if (_tempDirectory != null)
|
||||||
|
@ -342,9 +357,9 @@ public class WebAppProvider extends ScanningAppProvider
|
||||||
* If we used .setTempDirectory(File) all webapps will wind up in the
|
* If we used .setTempDirectory(File) all webapps will wind up in the
|
||||||
* same temp / work directory, overwriting each others work.
|
* same temp / work directory, overwriting each others work.
|
||||||
*/
|
*/
|
||||||
wah.setAttribute(WebAppContext.BASETEMPDIR,_tempDirectory);
|
webAppContext.setAttribute(WebAppContext.BASETEMPDIR, _tempDirectory);
|
||||||
}
|
}
|
||||||
return wah;
|
return webAppContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue