I am having a trouble getting my web application 'xyz' running in tomcat 7 server hosted in DigitalOcean servers at:
http://myDomain:8080/myWebApp
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!
Do not mark this as duplicate. I have checked all the solutions which worked for me in localhost, but not in digital ocean VPS. I think I am pretty specific here.
Thank you in advance!
I had to add this line in in the server.xml file. Tod do this:
nano etc/tomcat/server.xml
add this line:
<Context path="" docBase="Advocatoree" debug="0" reloadable="true"></Context>
Save the file.
Restart tomcat.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With