I am having a trouble getting my web application ‘xyz’ running at:
The name of my .war file is “.MyWebApp”.
after deploying the .war file in tomcat, the application starts at:
http://myDomain:8080/MyWebApp/myWebApp
any idea how to remove this “MyWebApp” part from the URL?
I have seen some of the solutions for this problem, they are mostly solutions of running the application in localhost. They suggested to change the ‘context.xml’ file which I already did like this:
<?xml version='1.0' encoding='utf-8'?>
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
path="" docBase="MyWebApp" debug="0" reloadable="true"
</Context>
Any help would be very much appreciated!
Thank you in advance!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Without knowing more information about the structure of your application, it’s difficult to provide a thorough answer to your question. On Ubuntu 14.04 with a standard Tomcat 7 installation, placing a war file in the
CATALINA_BASE
directory should accomplish what you want. For instance, let’s use the Tomcat “hello world” war:Now browsing to
http://your.ip.addr:8080/sample
will display the application. If you want to remove the app name from the path completely, you can rename the war file toROOT.war