jndiRefsConfig.storeResourceRefs(getWebApp());
if (securityConfig.getSecurity() != null) {
getWebApp().setSecurity(securityConfig.getSecurity());
}
GerWebAppDocument webAppDocument = GerWebAppDocument.Factory.newInstance();
webAppDocument.setWebApp(getWebApp());
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
XmlOptions options = new XmlOptions();
options.setSavePrettyPrint();
options.setSavePrettyPrintIndent(4);
options.setUseDefaultNamespace();
webAppDocument.save(outputStream, options);
outputStream.close();
deploymentPlan = new String(outputStream.toByteArray(), "US-ASCII");
return deploymentPlan;
}