final File archiveFile = new File(appBase, archive.getName());
archive.as(ZipExporter.class).exportTo(archiveFile, true);
embeddedHostConfig.deployWAR(archive.getName());
final ContextName contextName = getContextName(archive);
final StandardContext standardContext = (StandardContext) host.findChild(contextName.getName());
standardContextProducer.set(standardContext);
final HTTPContext httpContext = new HTTPContext(configuration.getBindAddress(),
configuration.getBindHttpPort());
for (String mapping : standardContext.findServletMappings())
{
httpContext.add(new Servlet(standardContext.findServletMapping(mapping), contextName.getPath()));
}
return new ProtocolMetaData().addContext(httpContext);
}
catch (Exception e)