How to get the base url from the jsp request object? http://localhost:8080/SOMETHING/index.jsp, but I want the part till index.jsp, how is it possible in jsp?
Instead of doing all of that, just do this:
request.getServerName().toString()