private void configureErrorPages(WebAppType webApp, GBeanData webModuleData) {
ErrorPageType[] errorPageArray = webApp.getErrorPageArray();
Map errorPageMap = new HashMap();
for (int i = 0; i < errorPageArray.length; i++) {
ErrorPageType errorPageType = errorPageArray[i];
if (errorPageType.isSetErrorCode()) {
errorPageMap.put(errorPageType.getErrorCode().getStringValue(), errorPageType.getLocation().getStringValue());
} else {
errorPageMap.put(errorPageType.getExceptionType().getStringValue(), errorPageType.getLocation().getStringValue());
}
}
webModuleData.setAttribute("errorPages", errorPageMap);
}