How to get domain URL and application name?

后端 未结 6 941
挽巷
挽巷 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:15

    The application name come from getContextPath.

    I find this graphic from Agile Software Craftsmanship HttpServletRequest Path Decoding sorts out all the different methods that are available:

提交回复
热议问题