ZipEntry src;
while ((src = module.getNextEntry()) != null) {
URI target = warRoot.resolve(src.getName());
if ("WEB-INF/web.xml".equals(src.getName())) {
byte[] buffer = getBytes(module);
context.addFile(target, new ByteArrayInputStream(buffer));
try {
WebAppDocument doc = (WebAppDocument) XmlBeansUtil.parse(new ByteArrayInputStream(buffer), WebAppDocument.type);
webApp = doc.getWebApp();
} catch (XmlException e) {
throw new DeploymentException("Unable to parse web.xml");