public void undeployWebApps(AppInfo appInfo) throws Exception {
for (WebAppInfo webApp : appInfo.webApps) {
ContextInfo contextInfo = getContextInfo(webApp);
if (contextInfo != null && contextInfo.deployer != null) {
StandardContext standardContext = contextInfo.standardContext;
HostConfig deployer = contextInfo.deployer;
deployer.unmanageApp(standardContext.getPath());
deleteDir(new File(standardContext.getServletContext().getRealPath("")));
removeContextInfo(standardContext);
}
}
}