code: private static void parseErrorPages(final ErrorPageType errorPageType, final WebApp webApp) {
  		final WebAppErrorPage errorPage = new WebAppErrorPage();
  		if (errorPageType.getErrorCode() != null) {
  			errorPage.setErrorCode(errorPageType.getErrorCode().getValue().toString());
  		}
  		if (errorPageType.getExceptionType() != null) {
  			errorPage.setExceptionType(errorPageType.getExceptionType().getValue());
  		}
  		if (errorPageType.getLocation() != null) {
  			errorPage.setLocation(errorPageType.getLocation().getValue());
  		}
  		if (errorPage.getErrorCode() == null && errorPage.getExceptionType() == null) {
  			errorPage.setExceptionType(ErrorPageModel.ERROR_PAGE);
  		}
  		webApp.addErrorPage(errorPage);
  	}
docs: Parses error pages out of web.xml.
  
  @param errorPageType errorPageType element from web.xml
  @param webApp        model for web.xml