Zdobądź host z obiektu żądania Java
request.getRequestURL().toString().replace(request.getRequestURI(), "")
Tender Tapir
request.getRequestURL().toString().replace(request.getRequestURI(), "")