How to change context root of a dynamic web project in Eclipse?

后端 未结 13 2718
一整个雨季
一整个雨季 2020-11-22 12:59

I developed a dynamic web project in Eclipse. I can access the app through my browser using the following URL:

http://localhost:8080/MyDynamicWebApp
         


        
13条回答
  •  感动是毒
    2020-11-22 13:24

    If you are running Tomcat from Eclipse, it doesn't use the configuration from your actual Tomcat installation. It uses the Tomcat configuration that it created and stored under "Servers" project. If you view your Eclipse workspace, you should see a project called "Servers". Expand that "Servers" project and you will come across server.xml. Open this file and scroll all the way to the bottom, and you should see something like this:-

    
    

    Here, you can just change your project context path to something else.

    Hope this helps.

提交回复
热议问题