WebApplicationsHolder webappsHolder = getWebappsHolder();
Map<String, WebApplication> startedWebapps = webappsHolder.getStartedWebapps();
for (String webappFileName : webappFileNames) {
try {
WebApplication webApplication = startedWebapps.get(webappFileName);
webappsHolder.stopWebapp(webApplication);
} catch (CarbonException e) {
handleException("Error occurred while undeploying webapps", e);
}
}
}