knownServlets.add(type.getServletName().getStringValue().trim());
}
ServletMappingType[] servletMappingArray = webApp.getServletMappingArray();
for (int i = 0; i < servletMappingArray.length; i++) {
ServletMappingType servletMappingType = servletMappingArray[i];
String servletName = servletMappingType.getServletName().getStringValue().trim();
if (!knownServlets.contains(servletName)) {
throw new DeploymentException("Web app " + module.getName() +
" contains a servlet mapping that refers to servlet '" + servletName +
"' but no such servlet was found!");
}
UrlPatternType[] urlPatterns = servletMappingType.getUrlPatternArray();
for (int j = 0; j < urlPatterns.length; j++) {
String urlPattern = urlPatterns[j].getStringValue().trim();
if (!knownServletMappings.contains(urlPattern)) {
knownServletMappings.add(urlPattern);
checkString(urlPattern);