Any clever ways of handling the context in a web app?

前端 未结 13 1521
一整个雨季
一整个雨季 2020-12-02 13:37

In Java, web apps are bundled in to WARs. By default, many servlet containers will use the WAR name as the context name for the application.

Thus myapp.war gets depl

13条回答
  •  天涯浪人
    2020-12-02 13:45

    Vilmantas said the right word here: relative URLs.

    All you need to do in your IMG is to use

    
    

    instead of

    
    

    and it'll be relative to the app context (as the browser is interpreting the URL to go to)

提交回复
热议问题