I undestand the difference between “running server” and the URL the user requested. I thought it was the first case (the URL rarely is useful, specially when you have a load balancer).
In my case I use InetAddress.getLocalHost for troubleshooting, we deploy by default in a cluster of 3 JBoss and an Apache load balancer and sometimes it’s relevant to know the physical machine where an exception is thrown. For instance, if there’s a problem on file permissions. Showing a message to the user is faster than checking multiple logs.