public URI getDefaultErrorDocumentURI( Integer statusCode ) {

	URI errorDocumentURI = this.errorDocumentMap.get( statusCode );
	
	// Error document defined for given status code?
	if( errorDocumentURI != null )
	    return errorDocumentURI;


	// Error document is not defined.
	// Try to fetch the DEFAULT error document instead
	String ckey = Constants.CKEY_HTTPCONFIG_ERROR_DOCUMENT_BASE.replaceAll( "\\{STATUS_CODE\\}", 
										"DEFAULT" );

	// Try to locate key in global configuration
	BasicType wrp_defaultErrorDocumentURI = this.getGlobalConfiguration().get( ckey );
	if( wrp_defaultErrorDocumentURI != null ) {
	    
	    try {

		return new URI( wrp_defaultErrorDocumentURI.getString() );

	    } catch( URISyntaxException e ) {

		this.getLogger().log( Level.WARNING,
				      getClass().getName() + ".getDefaultErrorDocumentURI(" + statusCode + ")",
				      "The configured default error document (" + ckey + ") contains a malformed URI: " + wrp_defaultErrorDocumentURI.getString() + "." );

		return null;

	    }
	}

	
	// Even the default error document is not specified
	return null;
    }