try {
// Generate the web application definition out of web.xml
// If one doesn't exist, create it
WebApplicationDefinitionImpl webApplicationDefinition = null;
if (webXml.exists()) {
WebApplicationUnmarshaller wau = new WebApplicationUnmarshaller();
wau.init(new FileInputStream(webXml), webModule);
webApplicationDefinition = (WebApplicationDefinitionImpl)wau.getWebApplicationDefinition();
} else {
webApplicationDefinition = new WebApplicationDefinitionImpl();
DisplayNameImpl dispName = new DisplayNameImpl();
dispName.setDisplayName(webModule);
dispName.setLocale(Locale.getDefault());