I am trying to get the domain name from the url with JSTL. The 2 methods I know return the wrong info. I need exactly what is in the url.
When I do: ${pageContext.request.remoteHost} I get an IP. When I do ${pageContext.request.serverName} I normally get the right domain name but on a server we have on amazon it is returning "server1" instead if the correct domain name, probably because of the way it handles multiple domains. Anyone know how I can get the current domain name in the url?
I may need to get the url and then parse it. How would I do that?