wau.init(new FileInputStream(webXmlFile), contextName);
WebApplicationDefinition webApplicationDefinition = wau.getWebApplicationDefinition();
// Parse the portlet.xml file --> PortletApplicationDefinition
xmlFile = "portlet.xml";
PortletApplicationUnmarshaller pau = new PortletApplicationUnmarshaller();
pau.init(new FileInputStream(portletXmlFile), contextName);
PortletApplicationDefinition portletApplicationDefinition = pau.getPortletApplicationDefinition(webApplicationDefinition);
// Add this PortletApplicationDefinition to the list
portletApplicationDefinitionList.add(portletApplicationDefinition.getId().toString(), portletApplicationDefinition);
} catch (Exception e) {
log.error( "Unable to parse " + xmlFile + " for context '" + contextName + "'", e);