}
}
}
// create a webapp
WebAppContext wah=null;
if (_contexts instanceof ContextHandlerCollection &&
WebAppContext.class.isAssignableFrom(((ContextHandlerCollection)_contexts).getContextClass()))
{
try
{
wah=(WebAppContext)((ContextHandlerCollection)_contexts).getContextClass().newInstance();
}
catch (Exception e)
{
throw new Error(e);
}
}
else
{
wah=new WebAppContext();
}
// configure it
wah.setContextPath(context);
if (_configurationClasses!=null)
wah.setConfigurationClasses(_configurationClasses);
if (_defaultsDescriptor!=null)
wah.setDefaultsDescriptor(_defaultsDescriptor);
wah.setExtractWAR(_extract);
wah.setWar(app.toString());
wah.setParentLoaderPriority(_parentLoaderPriority);
// add it
_contexts.addHandler(wah);
_deployed.add(wah);
if (_contexts.isStarted())
wah.start(); // TODO Multi exception
}
}