Reputation: 2098
I have deployed web application on tomcat7 and now I am looking forward to update Virtual host to map domain name with my application by updating server.xml. Is my approach correct? I am working on ubuntu OS and not sure how to get the context path for my web app. Any help is greatly appreciated.
Upvotes: 0
Views: 2555
Reputation: 427
The context path of your application will be the name of the war file. If you want to override it, you can follow Tomcat's documentation (https://tomcat.apache.org/tomcat-7.0-doc/config/context.html).
Edit the server.xml in the conf folder of the tomcat installation and make the following changes.
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="/yoururl" docBase="YourApp" useHttpOnly="false">
<Manager pathname="" />
</Context>
</Host>
Upvotes: 1