SyntaxFix
Write A Post
Hire A Developer
Questions
Seems like you need to strip the URL from the URL, so you can do it in a following way:
request.getRequestURL().toString().replace(request.getRequestURI(), "")