How to set context path in Tomcat so one could enter the site without appending the deployed folder name?

前端 未结 3 899
时光说笑
时光说笑 2021-01-04 11:38

I read about this on Tomcat guide here and some SO questions. And I think I\'m pretty much doing the same thing. But in some way cannot manage to succeed.

First of a

3条回答
  •  既然无缘
    2021-01-04 12:36

    In your question, you state that the admin set the context as:

    
    

    Based on the comments above, I would suggest trying to use the relative path of your application rather than the absolute path.

    I tried this on my tomcat server with:

    
    

    and that did the trick.

    The Host element which contains the Context element does actually set some parameters that might also impact the context. If it's the default settings, then a relative context should simply point to the webapps folder. If it's been changed, the results may vary.

提交回复
热议问题