} catch (UnknownHostException e) {
host="localhost"; //fallback
}
if(listener.findHttpProtocol().getSecurityEnabled().equals("false"))
wsi.setHttpVS(new VirtualServerInfo("http", host, Integer.parseInt(listener.getPort())));
else if(listener.findHttpProtocol().getSecurityEnabled().equals("true"))
wsi.setHttpsVS(new VirtualServerInfo("https", host, Integer.parseInt(listener.getPort())));
}
} else {
wsi.setHttpVS(new VirtualServerInfo("http", "localhost", 0));
}
return wsi;
}