I deploy a .war application from Eclipse by adding the “Dynamic Web Module” facet, then right-clicking on the project and selecting “Run As -> Run on Server”.
This works great, but by default the project is deployed to the /web context of Tomcat, because the project name is web. Is there a way I can deploy from Eclipse to Tomcat without changing the project name to ROOT?
You need to go to
Server View.. double click on tomcat, this opens a new window (with 2 tabs). Select the one which saysModules, your application would be listed there (with the context path). You can change the context path from /web to anything else from here.Alternatively, you can open server.xml look for a tag called context. within this tag you’ll find the contextroot as /web.. change it.