}
// Now get the portlet application definition out of portlet.xml
PortletApplicationUnmarshaller pau = new PortletApplicationUnmarshaller();
pau.init(new FileInputStream(portletXml), webModule);
PortletApplicationDefinition portletApplicationDefinition = pau.getPortletApplicationDefinition(webApplicationDefinition);
ControllerFactory controllerFactory = new ControllerFactoryImpl();
ServletDefinitionListCtrl servletDefinitionSetCtrl = (ServletDefinitionListCtrl)controllerFactory.get(webApplicationDefinition.getServletDefinitionList());
ServletMappingListImpl servletMappings = webApplicationDefinition.getServletMappings();
Iterator portlets = portletApplicationDefinition.getPortletDefinitionList().iterator();
while (portlets.hasNext()) {
PortletDefinition portlet = (PortletDefinition)portlets.next();
// Check if already exists