// <resource-ref>
ResourceRefImpl[] resourceRefs = webAppImpl.getResourceRefs();
if (resourceRefs != null) {
for (int i = 0; i < resourceRefs.length; i++) {
ResourceRefImpl resourceRef = resourceRefs[i];
Element resourceRefE = doc.createElement("resource-ref");
addDescriptions(resourceRefE, resourceRef.getDescriptions());
addTextElement(resourceRefE, "res-ref-name", resourceRef.getResRefName());
addTextElement(resourceRefE, "res-type", resourceRef.getResType());
addTextElement(resourceRefE, "res-auth", resourceRef.getResAuth());
addTextElement(resourceRefE, "res-sharing-scope", resourceRef.getResSharingScope());
webAppE.appendChild(resourceRefE);
}
}
// <security-constraint>