try {
webXmlUrl = new URL(moduleBase, "WEB-INF/web.xml");
} catch (MalformedURLException e) {
return null;
}
WebAppDocument webAppDoc = null;
try {
InputStream ddInputStream = webXmlUrl.openStream();
webAppDoc = getWebAppDocument(ddInputStream);
} catch (IOException e) {
return null;
} catch (DeploymentException e) {
return null;
}
if (webAppDoc == null) {
return null;
}
WebAppType webApp = webAppDoc.getWebApp();
String id = webApp.getId();
if (id == null) {
id = moduleBase.getFile();
if (id.endsWith("!/")) {
id = id.substring(0, id.length() - 2);