if (!location.endsWith("/")) {
location = location + "/";
}
// load the application
WebApplicationContext ctx = server.addWebApplication(appInfo.mountPoint, location);
ctx.setAttribute("_serverId", appInfo.server);
// set the session manager
SessionManager sm = new HashSessionManager();
ctx.getWebApplicationHandler().setSessionManager(sm);
// set the virtual hosts
for (String vh: virtualHosts) {
ctx.addVirtualHost(vh);
}
// set the init parameters
for (Map.Entry<String, String> entry: initParameters.entrySet()) {
ctx.setInitParameter(entry.getKey(), entry.getValue());
}
} catch (IOException e) {
Debug.logError(e, "Problem mounting application [" + appInfo.name + " / " + appInfo.location + "]", module);
}