Seems I can't figure out how to deploy a web application to a path I want on tomcat 7. Here are the details:
If I place myapp.war directly under the webapps directory of tomcat it will deploy, but under the path /myapp, which is not what I need.
I'm also trying to avoid editing tomcat's server.xml file.
I understand there are ways to do it using context files, but anything I tried just didn't work, looks like I'm missing something. If someone could describe the precise configuration to have this working it will be most appreciated.
This link has the explanation and how to do it. http://www3.ntu.edu.sg/home/ehchua/programming/howto/Tomcat_More.html
If you insist on using a webapp name that doesn't match the expected URL, then you must keep the webapp outside of the appBase directory, and create a conf/Catalina/[host]/[appName].xml file containing a element with a docBase attribute that points to the deployed location. Note that [appName] above is what you want to appear in the URL.
I had a similar issue and I tried the following apparoach and it worked for me:
Rename war file to match the context path and replace
"#". For example:
If you are using the context.xml then also you will have to rename it to
I hope it works for you as well. If you find other solution please share.