I want to get the root url of my web application from one of the servlet.
If I deploy my application in \"www.mydomain.com\" I want to get the root url like \"http:/
Generally, you can't obtain the URL; but, there are workarounds for specific cases. See Finding your application’s URL with only a ServletContext