Issue
How do you get the source domain using HttpServletRequest? Source domain is the requester's domain.
Thanks.
Solution
You could do either
// gets client (browser)'s hostname
String host = request.getRemoteHost();
OR
// get the server's domain name.
String domain = new URL(request.getRequestURL().toString()).getHost();
Answered By - adarshr