//
String docroot = getAppBase();
if (getDefaultWebModuleID() == null && findChild("") == null
&& docroot != null) {
WebBundleDescriptor wbd =
webArchivist.getDefaultWebXmlBundleDescriptor();
wmInfo = new WebModuleConfig();
wbd.setModuleID(Constants.DEFAULT_WEB_MODULE_NAME);
wbd.setContextRoot("");
wmInfo.setLocation(new File(docroot));
wmInfo.setDescriptor(wbd);
wmInfo.setParentLoader(
serverContext.getCommonClassLoader());
WebappClassLoader loader = new WebappClassLoader(
wmInfo.getParentLoader());
loader.start();
wmInfo.setAppClassLoader(loader);
if ( wbd.getApplication() == null ) {
Application application = new Application(Globals.getDefaultHabitat());
application.setVirtual(true);
application.setName(Constants.DEFAULT_WEB_MODULE_NAME);
wbd.setApplication(application);
}
}
return wmInfo;