This code assumes that undertow is an available subsystem. The fix starts of with a default (which may not work if there is no web container) and then overwrites the default with whatever is configured in undertow (if it is available)