ApacheModel model = (ApacheModel) amodel;
ConfigurationData[] webApps = PortletManager.getConfigurations(request, ConfigurationModuleType.WAR, true);
if(model.getWebApps().size() == 0) {
List list = model.getWebApps();
for (int i = 0; i < webApps.length; i++) {
ConfigurationData app = webApps[i];
WebAppData data = new WebAppData(app.getParentName().getArtifact(), app.getChildName(), app.getModuleBeanName() == null ? null : app.getModuleBeanName(), false, null, false);
if (app.isRunning()) {
WebModule web = (WebModule) PortletManager.getManagedBean(request, app.getModuleBeanName());
data.setContextRoot(web.getContextPath());
// String path;
// if(web.getWARDirectory().getProtocol().equals("file")) {
// path = web.getWARDirectory().getPath();
// } else {