Set your application context path in Tomcat 7

Set Context path in Tomcat 7 or more using catalina.properties file,

Step 1)
Add following lines to catalina.properties file under <tomcat-install dir>/conf directory,

#myApp war file version
myApp .war=myAppLive -1.0.0.1.war
myApp .path=/myAppLive

#application deployment location
appBase=webapps

Step 2)
Now update context path in <Host> node in server.xml file in same location,
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="false">
...
....  
 <Context path="${myApp .path}" docBase="${catalina.base}/${appBase}/${myApp .war}"/>
...
....

</Host>

Popular posts from this blog

Android: where to run keytool command in android

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine