MockHttpServletContext context = new MockHttpServletContext(this, application);
WebApplicationDeploymentContext deployment = new WebApplicationDeploymentContext(this, application, context);
application.preDeploySetup(deployment, false);
context.initialize();
this.deployed.put(application.getName(), deployment);
server.getHandler().applicationDeployed(new WebServerApplicationEvent(server, this, application));
return true;
} catch (Exception e) {
server.getHandler().applicationError(new WebServerApplicationErrorEvent(this, server, application, e, e.getMessage()));
return false;
}