I have a spring mvc 3.x web app in eclipse where the resource project artifact name is "webapp". So, http://localhost:8080/webapp
will load the main home page using tomcat 7 with the eclipse IDE.
However, when I release to tomcat 7.0 to some prod servers I don't want the URL to resolve to http://mywebsite.com/webapp but instead http://mywebsite.com
How can I achieve this?
You can follow either of below approaches
Delete existing ROOT/ directory (in webapps) from tomcat and rename your war file to ROOT.war and then deploy it.
Configure the context root in tomcat's conf/server.xml to use your war file (assuming my_war is your war name)
< Context path="" docBase="my_war" reloadable="true">