}
private WebApp getWebApp(Bundle bundle, String contextPath, boolean create){
WebApp webApp = (WebApp) contextToWebAppMap.get(contextPath);
if (webApp == null && create) {
try {
String secureString = (String)bundle.getHeaders().get("SOA-HTTPS-REQUIRED");
boolean requiresHttps = false;
if("true".equals(secureString)) requiresHttps = true;
webApp = new WebApp(getWebAppDescriptor(contextPath, requiresHttps));
webApp.start(context);
contextToWebAppMap.put(contextPath, webApp);
} catch (Throwable t) {
t.printStackTrace();
}
}