How to get domain URL and application name?

后端 未结 6 968
挽巷
挽巷 2020-12-02 04:55

Here\'s the scenario.

My Java web application has following path

https://www.mywebsite.com:9443/MyWebApp

Let\'s say there is a JSP

6条回答
  •  误落风尘
    2020-12-02 05:29

    I would strongly suggest you to read through the docs, for similar methods. If you are interested in context path, have a look here, ServletContext.getContextPath().

提交回复
热议问题