I have a URL path as http://localhost:8080/welcome/this/is/a/test
My line in Java is
String domain = httpServletRequest.getServerName();
But with this I get "localhost". I want the port number as well I want to get only "localhost:8080" in my string.