Root URl of the servlet

后端 未结 5 761
面向向阳花
面向向阳花 2020-12-03 02:49

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:/

5条回答
  •  甜味超标
    2020-12-03 03:00

    Generally, you can't obtain the URL; but, there are workarounds for specific cases. See Finding your application’s URL with only a ServletContext

提交回复
热议问题